Dynamic Graphs and RTComposer

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Dynamic Graphs and RTComposer

Demian Schkolnik
Hi all! 
I want to build a dynamic graph on a composer.. Is that possible?
It throws up an error on 'b add:ds', ie. when I want to add the dataset. It throws a 'MessageNotUnderstood' error. Can't I pass the Dynamic Grapher a RTStackedDataSet?

Thanks!

buildDynamicGraph:anObjectArray onComposer:aComposer
| b ds |
b := RTDynamicGrapher new.
b view: aComposer view.
ds := RTStackedDataSet new.
ds points: anObjectArray.
ds y: #second.
ds barShape width: 30.
ds histogramWithBarTitle: #first rotation: 0.

b add: ds.

b axisX noLabel; noTick.
b build.
^ b

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic Graphs and RTComposer

abergel
Hi Demian,

I have produced the class RTDynamicStackedGrapher. It should do what you expect.


        b := RTDynamicStackedGrapher new.
        b numberOfBars: 10.
        b minY: -200; maxY: 200.

        b y: #yourself.
         
        b barShape color: (Color red alpha: 0.3).
        b view addMenu: '+ 1' callback: [ b add: 400 atRandom - 200 ].
        b

Here is a short video:
https://dl.dropboxusercontent.com/u/31543901/TMP/RTDynamicStackedGrapher.mov

Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



> On May 4, 2015, at 7:34 PM, Demian Schkolnik <[hidden email]> wrote:
>
> Hi all!
> I want to build a dynamic graph on a composer.. Is that possible?
> It throws up an error on 'b add:ds', ie. when I want to add the dataset. It throws a 'MessageNotUnderstood' error. Can't I pass the Dynamic Grapher a RTStackedDataSet?
>
> Thanks!
>
> buildDynamicGraph:anObjectArray onComposer:aComposer
> | b ds |
>
> b := RTDynamicGrapher new.
> b view: aComposer view.
> ds := RTStackedDataSet new.
> ds points: anObjectArray.
> ds y: #second.
> ds barShape width: 30.
> ds histogramWithBarTitle: #first rotation: 0.
>
> b add: ds.
>
> b axisX noLabel; noTick.
> b build.
> ^ b
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic Graphs and RTComposer

Demian Schkolnik
Awesome! Thanks a lot !
Cheers!

El mié., 6 de may. de 2015 a la(s) 12:08 p. m., Alexandre Bergel <[hidden email]> escribió:
Hi Demian,

I have produced the class RTDynamicStackedGrapher. It should do what you expect.


        b := RTDynamicStackedGrapher new.
        b numberOfBars: 10.
        b minY: -200; maxY: 200.

        b y: #yourself.

        b barShape color: (Color red alpha: 0.3).
        b view addMenu: '+ 1' callback: [ b add: 400 atRandom - 200 ].
        b

Here is a short video:
https://dl.dropboxusercontent.com/u/31543901/TMP/RTDynamicStackedGrapher.mov

Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



> On May 4, 2015, at 7:34 PM, Demian Schkolnik <[hidden email]> wrote:
>
> Hi all!
> I want to build a dynamic graph on a composer.. Is that possible?
> It throws up an error on 'b add:ds', ie. when I want to add the dataset. It throws a 'MessageNotUnderstood' error. Can't I pass the Dynamic Grapher a RTStackedDataSet?
>
> Thanks!
>
> buildDynamicGraph:anObjectArray onComposer:aComposer
>       | b ds |
>
>       b := RTDynamicGrapher new.
>       b view: aComposer view.
>       ds := RTStackedDataSet new.
>       ds points: anObjectArray.
>       ds y: #second.
>       ds barShape width: 30.
>       ds histogramWithBarTitle: #first rotation: 0.
>
>       b add: ds.
>
>       b axisX noLabel; noTick.
>       b build.
>       ^ b
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic Graphs and RTComposer

jfabry
In reply to this post by abergel

That looks cool. The animation to make the first bar disappear is beautiful!

Question: can it also do a clear, and can it have labels on the x axis? I am thinking about having something like this:
http://www.animated-gifs.eu/leisure-music-equalizers/0033.gif

> On May 6, 2015, at 13:06, Alexandre Bergel <[hidden email]> wrote:
>
> Hi Demian,
>
> I have produced the class RTDynamicStackedGrapher. It should do what you expect.
>
>
> b := RTDynamicStackedGrapher new.
> b numberOfBars: 10.
> b minY: -200; maxY: 200.
>
> b y: #yourself.
>
> b barShape color: (Color red alpha: 0.3).
> b view addMenu: '+ 1' callback: [ b add: 400 atRandom - 200 ].
> b
>
> Here is a short video:
> https://dl.dropboxusercontent.com/u/31543901/TMP/RTDynamicStackedGrapher.mov
>
> Cheers,
> Alexandre
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>> On May 4, 2015, at 7:34 PM, Demian Schkolnik <[hidden email]> wrote:
>>
>> Hi all!
>> I want to build a dynamic graph on a composer.. Is that possible?
>> It throws up an error on 'b add:ds', ie. when I want to add the dataset. It throws a 'MessageNotUnderstood' error. Can't I pass the Dynamic Grapher a RTStackedDataSet?
>>
>> Thanks!
>>
>> buildDynamicGraph:anObjectArray onComposer:aComposer
>> | b ds |
>>
>> b := RTDynamicGrapher new.
>> b view: aComposer view.
>> ds := RTStackedDataSet new.
>> ds points: anObjectArray.
>> ds y: #second.
>> ds barShape width: 30.
>> ds histogramWithBarTitle: #first rotation: 0.
>>
>> b add: ds.
>>
>> b axisX noLabel; noTick.
>> b build.
>> ^ b
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>



---> 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
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic Graphs and RTComposer

abergel
> That looks cool. The animation to make the first bar disappear is beautiful!
>
> Question: can it also do a clear, and can it have labels on the x axis? I am thinking about having something like this:
> http://www.animated-gifs.eu/leisure-music-equalizers/0033.gif

Trivial to do.
Do you need it now?

Alexandre


>
>> On May 6, 2015, at 13:06, Alexandre Bergel <[hidden email]> wrote:
>>
>> Hi Demian,
>>
>> I have produced the class RTDynamicStackedGrapher. It should do what you expect.
>>
>>
>> b := RTDynamicStackedGrapher new.
>> b numberOfBars: 10.
>> b minY: -200; maxY: 200.
>>
>> b y: #yourself.
>>
>> b barShape color: (Color red alpha: 0.3).
>> b view addMenu: '+ 1' callback: [ b add: 400 atRandom - 200 ].
>> b
>>
>> Here is a short video:
>> https://dl.dropboxusercontent.com/u/31543901/TMP/RTDynamicStackedGrapher.mov
>>
>> Cheers,
>> Alexandre
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>> On May 4, 2015, at 7:34 PM, Demian Schkolnik <[hidden email]> wrote:
>>>
>>> Hi all!
>>> I want to build a dynamic graph on a composer.. Is that possible?
>>> It throws up an error on 'b add:ds', ie. when I want to add the dataset. It throws a 'MessageNotUnderstood' error. Can't I pass the Dynamic Grapher a RTStackedDataSet?
>>>
>>> Thanks!
>>>
>>> buildDynamicGraph:anObjectArray onComposer:aComposer
>>> | b ds |
>>>
>>> b := RTDynamicGrapher new.
>>> b view: aComposer view.
>>> ds := RTStackedDataSet new.
>>> ds points: anObjectArray.
>>> ds y: #second.
>>> ds barShape width: 30.
>>> ds histogramWithBarTitle: #first rotation: 0.
>>>
>>> b add: ds.
>>>
>>> b axisX noLabel; noTick.
>>> b build.
>>> ^ b
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>
>
>
> ---> 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
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic Graphs and RTComposer

jfabry

> On May 6, 2015, at 14:43, Alexandre Bergel <[hidden email]> wrote:
>
>> That looks cool. The animation to make the first bar disappear is beautiful!
>>
>> Question: can it also do a clear, and can it have labels on the x axis? I am thinking about having something like this:
>> http://www.animated-gifs.eu/leisure-music-equalizers/0033.gif
>
> Trivial to do.
> Do you need it now?

The earlier the better, as always :-) But I guess it can wait a day or two …

---> 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
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev