Hi all,
so I am impatient and I could not wait for Alex’s solution to my question of yesterday. I hacked something together that works most of the time, and now I have my scatterplot that updates itself quite quickly ! :- ) I give the core of the code below, and then report on a problem :-(
I have a builder instance variable, and an open and a refresh method. Open opens the first time, and refresh refreshes the view. (I call buildDataset, which builds the right dataset for the graph, that’s not relevant here).
open
builder := RTGrapher new.
builder add: self buildDataset.
builder build open
refresh
| view |
view := builder view.
view cleanAll.
builder := RTGrapher new.
builder view: view.
builder add: self buildDataset.
builder build
view signalUpdate.
And if you want this animated, just make an infinite loop that calls refresh (with a delay in-between to not hog the CPU).
autorefresh
self open.
[[true] whileTrue: [self refresh. (Delay forMilliseconds: 100) wait]] fork
Et voila! C’est cool quoi! (Yes, I’m in France right now :-) )
There is sadly one problem: sometimes I get the red morph of death in the window :-( AthensCairoCanvas>>setShape: sends asAthensShapeOn: to nil. It’s not immediate, but after some time (variable) I always get it :-(. Any pointers on what it may be and how to fix it??
---> Save our in-boxes! http://emailcharter.org <---
Johan Fabry - http://pleiad.cl/~jfabry
PLEIAD lab - Computer Science Department (DCC) - University of Chile
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
Hi everyone,
I'm working on a visualization using Roassal where
I created a label for a RTBox:
*box @ (RTLabelled new text: (Text fromString: 'blabla')).*
It works perfectly, but I'd like to change the font size of
the text. Does anyone know how to do it?
Cheers,
--
Ricardo Terra
Hello.
Is there some way to implement the hiding and showing some roassal elements? For example if I want to have the buttons in my view which will give me this opportunity.
Best regards,
Natalia
Hi!,
I want to present you RTCircularTreeMapBuilder a variation of
RTTreeMapBuilder.
For example to visualize the RTObject subclasses, type the next piece of
code:
.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=
| b | b := RTCircularTreeMapBuilder new. b shape color: Color transparent;
borderWidth: 1; borderColor: Color black; if: [ :cls | cls subclasses
isEmpty ] fillColor: [ :cls| (Smalltalk includesKey: (cls name, 'Test')
asSymbol) ifTrue: [ Color green ] ifFalse: [ Color purple ] ]. b
baseradius: 200; weight: [ :cls | cls withAllSubclasses size]. b explore:
RTObject using: #subclasses. b build. ^ b view
.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=
[image: Imágenes integradas 2]
Another example in the file system.
.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=
| b dirSize |
b := RTCircularTreeMapBuilder new.
b shape
color: Color transparent;
borderWidth: 1;
borderColor: Color white;
if: [ :f | f isDirectory ] fillColor: Color transparent;
if: [ :f | f isDirectory not ] fillColor: Color white.
dirSize := nil.
dirSize := [ :file | | size |
file isDirectory
ifTrue: [
size := 0.
file children do: [ :child | size := size + (dirSize value: child)].
size isZero ifTrue: [ 1 ] ifFalse: [ size ] ]
ifFalse: [ size := file size.
size isNumber ifTrue: [ size ] ifFalse: [ 1 ] ] ].
b
baseradius: 200;
weight: [:file | file isDirectory ifTrue: [ dirSize value: file ] ifFalse:
[ file size ] ].
b explore: FileLocator home asFileReference
using: [:file | | children |
[ children := file isDirectory ifTrue: [ file children ] ifFalse: [ #() ] ]
on: Error do: [ children := #() ].
children ] .
b build.
b view canvas color: Color black.
b view
.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=
You can see the result in the next link
http://objectprofile.com/examples/circle.html
Cheers,
Milton
Dear All,
This week end I have integrated the excellent work of Onil Goubier and Thierry Goubier. They have worked on a bridge between OpenStreetMap and Roassal. As a result, you can easily decorate a map with element describing metrics and properties of geolocation. Consider the following:
I think the following screenshot should be self-explanatory:
Below are some results of 10lines-long scripts. Seisms during the last 30 days:
Refugies monitored by the United Nations High Commissioner for Refugees:
We started to write a chapter for Agile Visualization. Here it is:
https://dl.dropboxusercontent.com/u/31543901/AgileVisualization/OpenStreetM…
Again, thanks Onil and Thierry. This is a very valuable contribution for the whole community!
Cheers,
Alexandre
NB: Sorry for the cross-post, but I believe the content of this email goes well beyond to the Moose people interest.
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.