Hi Serge,
The script you have sent does not work well. Curves are not in the graphs :-( I think Bui has produce graphs that correctly use Charter
Do you have the version Bui produced?
Cheers, Alexandre
On Sep 29, 2014, at 7:31 AM, Serge Stinckwich serge.stinckwich@gmail.com wrote:
On Thu, Sep 25, 2014 at 6:41 PM, Offray Vladimir Luna Cárdenas offray@riseup.net wrote:
Hi Serge,
I see that your graph has two texts, 'Ebola cases' and 'Guinea cases', but I get only one blue line colored plot. Is that the intended, and what these two labels means? (particularly Guinea cases).
My idea was to plot many curve for each country (not done in this script). The first label is the text of the legend, the second one, the name of the blue curve.
This is an example with two countries:
tab := RTTabTable new input: (ZnEasy get: 'https://raw.githubusercontent.com/cmrivers/ebola/master/country_timeseries.c...') contents usingDelimiter: $,. tab removeFirstRow. tab replaceEmptyValuesWith: '0' inColumns: (2 to: 12) asArray. tab convertColumnsAsInteger: (2 to: 12) asArray. tab convertColumnAsDateAndTime: 1. tab replaceZeroWithCumulativeValuesInColumns: (2 to:12) asArray. data := tab values reversed.
minEntry := data minFor: #first.
b := RTCharterBuilder new. b extent: 400@200. b shape ellipse size:0. b points: data. b connectDotColor: Color blue. b allY: [ :v | v at: 3 ]. b allX: [ :v | v first julianDayNumber - minEntry first julianDayNumber ].
b points: data. b connectDotColor: Color green. b allY: [ :v | v at: 4 ]. b allX: [ :v | v first julianDayNumber - minEntry first julianDayNumber ].
b axisConfiguration labelRotation: -30; labelConvertion: [ :v | (Date julianDayNumber: v + minEntry first julianDayNumber) ]. b axisX.
b resetAxisConfiguration. b axisY. b build.
lb := RTLegend2Builder new. lb view: b view. lb addText: 'Ebola cases'. lb addColor: Color blue text: 'Guinea'. lb addColor: Color green text: 'Liberia'. lb build. b open. ===================================================
Regards,
Serge Stinckwich UCBN & UMI UMMISCO 209 (IRD/UPMC) Every DSL ends up being Smalltalk http://www.doesnotunderstand.org/
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev