Hi all,
i try to use EyeSee to plot mathematical functions with ESLineDiagram.
They is not easy as i might expect at the beginning :-)
The problem is EyeSee is using collections as models. I try to
transform the function as a collection like above but maybe there is a
better way to do that.
|diag f functionAsModel|
f := [:x | x*x].
functionAsModel := (0 to:10 by:0.1) collect:[:each | f value:each].
diag := ESDiagramRenderer new.
(diag lineDiagram)
y: #yourself;
yAxisLabel: 'X^2';
rotatedLabels: true;
regularAxis;
defaultColor: Color green;
models: functionAsModel.
diag open
Regards,
--
Serge Stinckwich
UMI UMMISCO 209 (IRD/UPMC), Hanoi, Vietnam
Every DSL ends up being Smalltalk
http://doesnotunderstand.org/