From Charter to Grapher

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

From Charter to Grapher

hernanmd
How would be ported this code using RTCharterBuilder

    | b |
    b := RTCharterBuilder new.
    b extent: 500 @ 200.
    b points: keys.
    b stackX.
    b allY: [ : each | aBag occurrencesOf: each ].
    b histogramWithBarTitle: #yourself.
    b axisY.
    b newAxisConfiguration plain.
    b axisXTitled: 'MyTitle'.
    b axisX.
    b build.
    ^ b    

using RTGrapher?

Because some methods are missing (#points: #stackX, etc) in the latest version of Roassal2.

Hernán


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: From Charter to Grapher

Pierre Chanson
Hi Hernan,

I did not knew what was "keys" and "aBag" so I replace them in your code and change your code in:

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    b := RTCharterBuilder new.
    b extent: 500 @ 200.
    b points: RTShape withAllSubclasses.
    b stackX.
    b allY: #numberOfLinesOfCode.
    b histogramWithBarTitle: #yourself.
    b axisY.
    b newAxisConfiguration plain.
    b axisXTitled: 'MyTitle'.
    b axisX.
    b build.
    ^ b   
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

The equivalent for this code with RTGrapher is:

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| b ds |
b := RTGrapher new.
b extent: 500 @ 200.

ds := RTStackedDataSet new.
ds interaction highlight.
ds points: RTShape withAllSubclasses.
ds barShape width: 10.
ds y: #numberOfMethods.
ds histogramWithBarTitle: #name.
b add: ds.

b axisY.
b axisX noTick; noLabel.
b build.
^ b view
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

The render:

Cheers,

Pierre

2015-02-18 16:46 GMT-03:00 Hernán Morales Durand <[hidden email]>:
How would be ported this code using RTCharterBuilder

    | b |
    b := RTCharterBuilder new.
    b extent: 500 @ 200.
    b points: keys.
    b stackX.
    b allY: [ : each | aBag occurrencesOf: each ].
    b histogramWithBarTitle: #yourself.
    b axisY.
    b newAxisConfiguration plain.
    b axisXTitled: 'MyTitle'.
    b axisX.
    b build.
    ^ b    

using RTGrapher?

Because some methods are missing (#points: #stackX, etc) in the latest version of Roassal2.

Hernán


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: From Charter to Grapher

hernanmd
Really nice, it worked perfectly.
Thank you Pierre,

Hernán

2015-02-19 11:08 GMT-03:00 Pierre CHANSON <[hidden email]>:
Hi Hernan,

I did not knew what was "keys" and "aBag" so I replace them in your code and change your code in:

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    b := RTCharterBuilder new.
    b extent: 500 @ 200.
    b points: RTShape withAllSubclasses.
    b stackX.
    b allY: #numberOfLinesOfCode.
    b histogramWithBarTitle: #yourself.
    b axisY.
    b newAxisConfiguration plain.
    b axisXTitled: 'MyTitle'.
    b axisX.
    b build.
    ^ b   
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

The equivalent for this code with RTGrapher is:

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| b ds |
b := RTGrapher new.
b extent: 500 @ 200.

ds := RTStackedDataSet new.
ds interaction highlight.
ds points: RTShape withAllSubclasses.
ds barShape width: 10.
ds y: #numberOfMethods.
ds histogramWithBarTitle: #name.
b add: ds.

b axisY.
b axisX noTick; noLabel.
b build.
^ b view
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

The render:

Cheers,

Pierre

2015-02-18 16:46 GMT-03:00 Hernán Morales Durand <[hidden email]>:
How would be ported this code using RTCharterBuilder

    | b |
    b := RTCharterBuilder new.
    b extent: 500 @ 200.
    b points: keys.
    b stackX.
    b allY: [ : each | aBag occurrencesOf: each ].
    b histogramWithBarTitle: #yourself.
    b axisY.
    b newAxisConfiguration plain.
    b axisXTitled: 'MyTitle'.
    b axisX.
    b build.
    ^ b    

using RTGrapher?

Because some methods are missing (#points: #stackX, etc) in the latest version of Roassal2.

Hernán


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev