Tx

now how can I see that there is no value for 2 and 5?

Stef

Le 15/2/16 15:54, Brice GOVIN a écrit :

You can try something like that:



     b := Bag new.
     b add: 1 withOccurrences: 5.
     b add: 3 withOccurrences: 4.
     b add: 6.
     b.

    v := RTDoubleGraphBuilder new.
    ds:=RTStackedDataSet new.
    ds interaction popup.
    ds points: b valuesAndCounts keys.
    ds y:[:c|cb valuesAndCounts at: c].
    ds barShape color: Color red; width: 15.
    v add: ds.
    v axisX.
    v axisYWithNumberOfTicks: 5.
    v open


I'm working with an old version of Roassal (version 761 of the Roassal package) then I don't know if it's working with a more recent version.

Otherwise there is examples in the Grapher Menu of the Roassal examples.


Regards,


--------------
Brice Govin
PhD student in RMoD research team at INRIA Lille
Software Engineer at THALES AIR SYSTEMS Rungis
ENSTA-Bretagne ENSI2014
22 Avenue du General Leclerc 92340 BOURG-LA-REINE


________________________________________
De : moose-dev-bounces@list.inf.unibe.ch <moose-dev-bounces@list.inf.unibe.ch> de la part de stepharo <stepharo@free.fr>
Envoyé : lundi 15 février 2016 15:22
À : Moose-related development
Objet : [Moose-dev] How to display an histogram given a bag

Hi

I have a bag

     b := Bag new.
     b add: 1 withOccurrences: 5.
     b add: 3 withOccurrences: 4.
     b add: 6.
     b

and I would like to display it as an histogram with roassal.

Stef
_______________________________________________
Moose-dev mailing list
Moose-dev@list.inf.unibe.ch
https://www.list.inf.unibe.ch/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
Moose-dev@list.inf.unibe.ch
https://www.list.inf.unibe.ch/listinfo/moose-dev