Alexandre
why don't you communicate it well in the code.
This is really easy to deprecate the new method, put the class in a
different package.
We will not use Roassal anymore in our open-devs lectures just because
we literally burnt a poor
student that was systematically bumping into deprecated code but non
explicit.
It gives a really bad impression of Pharo after this kind of experience.
Stef
First of all, RTGrapherBuilder has been obsoleted. Use RTGrapher instead.
I guess this is a problem with rounding with RTGrapherBuilder. With
RTGrapher, I do not see this behavior.
For example:
-=-=-=-=-=-=-=-=-=-=-=-=
events := { 10.0 @ 1.0. 9.0 @ 2.0. 8.0 @ 3.0.
7.0 @ 4.0. 6.0 @ 5.0. 5.0 @ 6.0.
4.0 @ 7.0. 3.0 @ 8.0. 2.0 @ 9.0.
1.0 @ 10.0. 0.0 @ 11.0}.
b := RTGrapher new.
b extent: 400 @ 200.
ds := RTDataSet new.
ds dotShape circle color: Color red.
ds interaction fixedPopupText: [ :e | e printString ].
ds points: events.
ds connectColor: Color blue.
ds x: [ :e | e y ].
ds y: [ :e | e x ].
b add: ds.
b axisX noTick; noLabel.
b axisY noTick; noLabel.
b build.
b view add: ((RTLine new width: 0.02; color: Color yellow) edgeFrom: b
view elements fifth to: b view elements last).
b view
-=-=-=-=-=-=-=-=-=-=-=-=
A deep zoom-in shows everything is okay:
Cheers,
Alexandre
On Jun 13, 2015, at 8:00 PM, Javier Pimás <elpochodelage...@gmail.com
<mailto:elpochodelage...@gmail.com>> wrote:
Hi guys, I'm drawing a chart with roassal2 and just discovered that
lines are not being drawn exactly as expected. Maybe this is a known
problem? I'm running on a few months old pharo4beta image, in linux.
Here I attach a screenshot corresponding to the code below. There are
more evident examples but this one is easier to debug as it is a
straight line made of many segments (zooming a bit you'll see the
thin reference line and notice the blue line "bends"). Thanks for
reading!
Cheers,
Javier
test
| b ds events |
events := { 10.0 @ 1.0. 9.0 @ 2.0. 8.0 @ 3.0.
7.0 @ 4.0. 6.0 @ 5.0. 5.0 @ 6.0.
4.0 @ 7.0. 3.0 @ 8.0. 2.0 @ 9.0.
1.0 @ 10.0. 0.0 @ 11.0}.
b := RTGrapherBuilder new.
b extent: 400 @ 200.
ds := RTDataSet new.
ds dotShape circle color: Color red.
ds interaction fixedPopupText: [ :e | e printString ].
ds points: events.
ds connectColor: Color blue.
ds x: [ :e | e y ].
ds y: [ :e | e x ].
b add: ds.
b axisXWithNumberOfTicks: events size.
^b build
<image.png>
--
Javier Pimás
Ciudad de Buenos Aires
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.