Grapher slightly improved

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

Grapher slightly improved

abergel
Hi!

Just to share some of the progresses we are making with Grapher.

We can now mix bar and curve. Here is an example:


Result of the script:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| b ds |
b := RTGrapherBuilder new.
b extent: 400 @ 400.

ds := RTStackedDataSet new.
ds barShape color: (Color red).
ds points: (-3 to: 3.1415 * 5 by: 0.1).
ds y: [ :v | v sin ].

b add: ds.

ds := RTStackedDataSet new.
ds noDot.
ds connectColor: Color blue.
ds points: (-3 to: 3.1415 * 5 by: 0.1).
ds y: [ :v | v cos ].
b add: ds.

b build.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Another example:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
data := (1 to: 20) collect: [ :v | 10 atRandom - 5 ].
 
b := RTGrapherBuilder new.

b extent: 300 @ 200.

ds := RTStackedDataSet new.
ds interaction popup.
ds points: data.
ds barShape width: 8; 
      color: (Color green alpha: 0.3);
     if: [:value | value < 0 ] fillColor: (Color red alpha: 0.3).
b add: ds.
b
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Cheers,
Alexandre

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




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

Re: Grapher slightly improved

Usman Bhatti
Very nice Alex.
I'll have a look now.

On Fri, Dec 5, 2014 at 8:23 PM, Alexandre Bergel <[hidden email]> wrote:
Hi!

Just to share some of the progresses we are making with Grapher.

We can now mix bar and curve. Here is an example:


Result of the script:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| b ds |
b := RTGrapherBuilder new.
b extent: 400 @ 400.

ds := RTStackedDataSet new.
ds barShape color: (Color red).
ds points: (-3 to: 3.1415 * 5 by: 0.1).
ds y: [ :v | v sin ].

b add: ds.

ds := RTStackedDataSet new.
ds noDot.
ds connectColor: Color blue.
ds points: (-3 to: 3.1415 * 5 by: 0.1).
ds y: [ :v | v cos ].
b add: ds.

b build.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Another example:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
data := (1 to: 20) collect: [ :v | 10 atRandom - 5 ].
 
b := RTGrapherBuilder new.

b extent: 300 @ 200.

ds := RTStackedDataSet new.
ds interaction popup.
ds points: data.
ds barShape width: 8; 
      color: (Color green alpha: 0.3);
     if: [:value | value < 0 ] fillColor: (Color red alpha: 0.3).
b add: ds.
b
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Cheers,
Alexandre

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




_______________________________________________
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