Hi Johan!
We have produced the class RTDynamicGrapher. You can dynamically add elements. Here is a
try:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
b := RTDynamicGrapher new.
b maxX: 100.
b maxY: 100.
b x: #x; y: #y.
b shape circle color: (Color red alpha: 0.3).
b view addMenu: '+ 10' callback: [
b addAll: ((1 to: 10) collect: [ :i | (100 atRandom @ 100 atRandom) ]) ].
^ b
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Once you have set your instance of RTDynamicGrapher, then you can use #add:, #addAll: to
add elements. You can also change the shape if necessary.
I believe this should completely fulfill your requirements :-)
Cheers,
Alexandre
On Jan 21, 2015, at 5:12 PM, Johan Fabry
<jfabry(a)dcc.uchile.cl> wrote:
Hi all,
I am thinking about a specific setting where I want to make a scatterplot that is
somewhat dynamic: I have collections of points coming in regularly and when a new
collection has arrived I want to remove the existing plot and show the new data. I thought
I would be able to do something with the existing Grapher infrastructure. My idea was to
remove all elements from the open RTView instance, then remove the dataset from the
RTGrapher instance, add the new dataset to the RTGrapher instance and call build again.
But I cannot remove a dataset from a RTGrapher, so apparently no go.
Is there a way to do something like this without making modifications to Roassal? I could
hack something together of course but prefer existing infrastructure, if present.
Also, I want to set max X and max Y beforehand because I know what the range of the
incoming points is.
Any pointers would be appreciated!
---> Save our in-boxes!
http://emailcharter.org <---
Johan Fabry -
http://pleiad.cl/~jfabry
PLEIAD lab - Computer Science Department (DCC) - University of Chile
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.