Label in EyeSee

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

Label in EyeSee

abergel
Hi!

Based on some example (e.g., below), I inferred that #valueAxis set on labels for the vertical axis. The one on the horizontal axis are set by #identifier:

What #labels: is for exactly?

| diagram |
diagram := ESDiagramRenderer new.
(diagram verticalBarDiagram)
y: [:each | each];
labels: #yourself;
identifier: #yourself;
defaultColor: Color blue;
valueAxis;
width: 500;
rotatedLabels: false;
models: (1 to: 21).

^ diagram open

I have produced the following curve. How can I get the label on the vertical axis as float (with 2 decimal), but not fractions. 

I will use your answers to comment some of the method in EyeSee. 

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: Label in EyeSee

Andre Hora
Hello Alex,

- What #labels: is for exactly?
It changes the label string in y axis. By default it is #yourself. For example, you can do:

| diagram |
diagram := ESDiagramRenderer new.
(diagram verticalBarDiagram)
y: [:each | each];
labels: [ :each | each value asString, '%' ];
identifier: #yourself;
defaultColor: Color blue;
valueAxis;
width: 500;
rotatedLabels: false;
models: (1 to: 21).
^ diagram open

image.png

- How can I get the label on the vertical axis as float (with 2 decimal), but not fractions.
You can use #labels: for that. For example:

| diagram |
diagram := ESDiagramRenderer new.
(diagram lineDiagram)
y: [:each | each];
labels: [ :each | each value asTruncatedFloat ];
defaultColor: Color blue;
valueAxis;
width: 500;
rotatedLabels: true;
models: (1 to: 13) / 16.
diagram open

image.png
On Thu, Dec 8, 2011 at 4:50 PM, Alexandre Bergel <alexan [hidden email]> wrote:
Hi!

Based on some example (e.g., below), I inferred that #valueAxis set on labels for the vertical axis. The one on the horizontal axis are set by #identifier:
What #labels: is for exactly?

| diagram |
diagram := ESDiagramRenderer new.
(diagram verticalBarDiagram)
y: [:each | each];
labels: #yourself;
identifier: #yourself;
defaultColor: Color blue;
valueAxis;
width: 500;
rotatedLabels: false;
models: (1 to: 21).

^ diagram open

I have produced the following curve. How can I get the label on the vertical axis as float (with 2 decimal), but not fractions. 

I will use your answers to comment some of the method in EyeSee. 

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






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




--
Andre Hora


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

Re: Label in EyeSee

abergel
Thanks Andre, I will add these comments, update my slides.

Cheers,
Alexandre


On 8 Dec 2011, at 13:25, Andre Hora wrote:

> Hello Alex,
>
> - What #labels: is for exactly?
> It changes the label string in y axis. By default it is #yourself. For example, you can do:
>
> | diagram |
> diagram := ESDiagramRenderer new.
> (diagram verticalBarDiagram)
> y: [:each | each];
> labels: [ :each | each value asString, '%' ];
> identifier: #yourself;
> defaultColor: Color blue;
> valueAxis;
> width: 500;
> rotatedLabels: false;
> models: (1 to: 21).
> ^ diagram open
>
> <image.png>
>
> - How can I get the label on the vertical axis as float (with 2 decimal), but not fractions.
> You can use #labels: for that. For example:
>
> | diagram |
> diagram := ESDiagramRenderer new.
> (diagram lineDiagram)
> y: [:each | each];
> labels: [ :each | each value asTruncatedFloat ];
> defaultColor: Color blue;
> valueAxis;
> width: 500;
> rotatedLabels: true;
> models: (1 to: 13) / 16.
> diagram open
>
> <image.png>
> On Thu, Dec 8, 2011 at 4:50 PM, Alexandre Bergel <alexan [hidden email]> wrote:
> Hi!
>
> Based on some example (e.g., below), I inferred that #valueAxis set on labels for the vertical axis. The one on the horizontal axis are set by #identifier:
> What #labels: is for exactly?
>
> | diagram |
> diagram := ESDiagramRenderer new.
> (diagram verticalBarDiagram)
> y: [:each | each];
> labels: #yourself;
> identifier: #yourself;
> defaultColor: Color blue;
> valueAxis;
> width: 500;
> rotatedLabels: false;
> models: (1 to: 21).
>
> ^ diagram open
>
> I have produced the following curve. How can I get the label on the vertical axis as float (with 2 decimal), but not fractions.
> <Screen Shot 2011-12-08 at 12.49.10.png>
>
> I will use your answers to comment some of the method in EyeSee.
>
> Cheers,
> Alexandre
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
>
>
> --
> Andre Hora
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

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





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

Re: Label in EyeSee

cbc
In reply to this post by Andre Hora
It is worth pointing out that the #labels: method only works if you are using a #valueAxis.  Any other type of axis (from what I've been able to determine) ignores the #labels: method.

-Chris

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

Re: Label in EyeSee

abergel
In reply to this post by Andre Hora
Thanks Chris and Andre!
Your comments are in the version 0.9.6 of EyeSee.

I did not include Serge's improvement because I would like to hear Andre first on this.

Cheers,
Alexandre


On 8 Dec 2011, at 13:25, Andre Hora wrote:

> Hello Alex,
>
> - What #labels: is for exactly?
> It changes the label string in y axis. By default it is #yourself. For example, you can do:
>
> | diagram |
> diagram := ESDiagramRenderer new.
> (diagram verticalBarDiagram)
> y: [:each | each];
> labels: [ :each | each value asString, '%' ];
> identifier: #yourself;
> defaultColor: Color blue;
> valueAxis;
> width: 500;
> rotatedLabels: false;
> models: (1 to: 21).
> ^ diagram open
>
> <image.png>
>
> - How can I get the label on the vertical axis as float (with 2 decimal), but not fractions.
> You can use #labels: for that. For example:
>
> | diagram |
> diagram := ESDiagramRenderer new.
> (diagram lineDiagram)
> y: [:each | each];
> labels: [ :each | each value asTruncatedFloat ];
> defaultColor: Color blue;
> valueAxis;
> width: 500;
> rotatedLabels: true;
> models: (1 to: 13) / 16.
> diagram open
>
> <image.png>
> On Thu, Dec 8, 2011 at 4:50 PM, Alexandre Bergel <alexan [hidden email]> wrote:
> Hi!
>
> Based on some example (e.g., below), I inferred that #valueAxis set on labels for the vertical axis. The one on the horizontal axis are set by #identifier:
> What #labels: is for exactly?
>
> | diagram |
> diagram := ESDiagramRenderer new.
> (diagram verticalBarDiagram)
> y: [:each | each];
> labels: #yourself;
> identifier: #yourself;
> defaultColor: Color blue;
> valueAxis;
> width: 500;
> rotatedLabels: false;
> models: (1 to: 21).
>
> ^ diagram open
>
> I have produced the following curve. How can I get the label on the vertical axis as float (with 2 decimal), but not fractions.
> <Screen Shot 2011-12-08 at 12.49.10.png>
>
> I will use your answers to comment some of the method in EyeSee.
>
> Cheers,
> Alexandre
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
>
>
> --
> Andre Hora
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

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





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