Grapher: Set X axis start at custom value

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

Grapher: Set X axis start at custom value

hernanmd
Hello

I am using Roassal2-AlexandreBergel.1335 in Pharo 5.

Most, if not all, Grapher example visualizations starts at point 0 in the X axis. My points are chromosome positions starting at 7,000,000. Is there a way to configure the X axis to start from that position or a custom value? (X label always start at 0 but points does not get rendered until 7M).

If you take the following as example, I would like to start the X axis at 1 approx removing the empty range between 0 and 1.

| b values ds |
b := RTGrapher new.
values := #(5 6 7 -1 -3).
b extent: 400 @ 300.

ds := RTData new.
ds interaction popup.
ds points: values.
ds connectColor: Color red.
ds y: #yourself.

b add: ds.

b build.
^ b view


Hernan


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

Re: Grapher: Set X axis start at custom value

Peter Uhnak

Hi,

 

I’ve added #withoutOrigin for this purpose, but I don’t know the exact commit number, it was some time ago.

 

Keep in mind, that you need to also set the minX value, e.g.:

 

| b values ds |

b := RTGrapher new.

values := #(5 6 7 -1 -3).

b extent: 400 @ 300.

b minX: 1.

b withoutOrigin.

 

ds := RTData new.

ds interaction popup.

ds points: values.

ds connectColor: Color red.

ds y: #yourself.

 

b add: ds.

 

b build.

^ b view

 

Peter

 

 

From: [hidden email]
Sent: Thursday, September 8, 2016 10:17 PM
To: [hidden email]
Subject: [Moose-dev] Grapher: Set X axis start at custom value

 

Hello

I am using Roassal2-AlexandreBergel.1335 in Pharo 5.

Most, if not all, Grapher example visualizations starts at point 0 in the X axis. My points are chromosome positions starting at 7,000,000. Is there a way to configure the X axis to start from that position or a custom value? (X label always start at 0 but points does not get rendered until 7M).

 

If you take the following as example, I would like to start the X axis at 1 approx removing the empty range between 0 and 1.


| b values ds |
b := RTGrapher new.
values := #(5 6 7 -1 -3).
b extent: 400 @ 300.

ds := RTData new.
ds interaction popup.
ds points: values.
ds connectColor: Color red.
ds y: #yourself.

b add: ds.

b build.
^ b view

Hernan

 


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

Re: Grapher: Set X axis start at custom value

hernanmd
I loaded the latest version and it worked perfectly :)
Thank you Peter!

Hernán


2016-09-08 20:28 GMT-03:00 <[hidden email]>:

Hi,

 

I’ve added #withoutOrigin for this purpose, but I don’t know the exact commit number, it was some time ago.

 

Keep in mind, that you need to also set the minX value, e.g.:

 

| b values ds |

b := RTGrapher new.

values := #(5 6 7 -1 -3).

b extent: 400 @ 300.

b minX: 1.

b withoutOrigin.

 

ds := RTData new.

ds interaction popup.

ds points: values.

ds connectColor: Color red.

ds y: #yourself.

 

b add: ds.

 

b build.

^ b view

 

Peter

 

 

From: [hidden email]
Sent: Thursday, September 8, 2016 10:17 PM
To: [hidden email]
Subject: [Moose-dev] Grapher: Set X axis start at custom value

 

Hello

I am using Roassal2-AlexandreBergel.1335 in Pharo 5.

Most, if not all, Grapher example visualizations starts at point 0 in the X axis. My points are chromosome positions starting at 7,000,000. Is there a way to configure the X axis to start from that position or a custom value? (X label always start at 0 but points does not get rendered until 7M).

 

If you take the following as example, I would like to start the X axis at 1 approx removing the empty range between 0 and 1.


| b values ds |
b := RTGrapher new.
values := #(5 6 7 -1 -3).
b extent: 400 @ 300.

ds := RTData new.
ds interaction popup.
ds points: values.
ds connectColor: Color red.
ds y: #yourself.

b add: ds.

b build.
^ b view

Hernan

 



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

Re: Grapher: Set X axis start at custom value

abergel
In reply to this post by Peter Uhnak
Yes, this is very cool. Thanks Peter!

Alexandre



On Sep 8, 2016, at 8:28 PM, [hidden email] wrote:

Hi,
 
I’ve added #withoutOrigin for this purpose, but I don’t know the exact commit number, it was some time ago.
 
Keep in mind, that you need to also set the minX value, e.g.:
 
| b values ds |
b := RTGrapher new.
values := #(5 6 7 -1 -3).
b extent: 400 @ 300.
b minX: 1.
b withoutOrigin.
 
ds := RTData new.
ds interaction popup.
ds points: values.
ds connectColor: Color red.
ds y: #yourself.
 
b add: ds.
 
b build.
^ b view
 
Peter
 
 
From: [hidden email]
Sent: Thursday, September 8, 2016 10:17 PM
To: [hidden email]
Subject: [Moose-dev] Grapher: Set X axis start at custom value
 

Hello

I am using Roassal2-AlexandreBergel.1335 in Pharo 5.

Most, if not all, Grapher example visualizations starts at point 0 in the X axis. My points are chromosome positions starting at 7,000,000. Is there a way to configure the X axis to start from that position or a custom value? (X label always start at 0 but points does not get rendered until 7M).
 
If you take the following as example, I would like to start the X axis at 1 approx removing the empty range between 0 and 1.


| b values ds |
b := RTGrapher new.
values := #(5 6 7 -1 -3).
b extent: 400 @ 300.

ds := RTData new.
ds interaction popup.
ds points: values.
ds connectColor: Color red.
ds y: #yourself.

b add: ds.

b build.
^ b view

Hernan

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


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