|
How to plot a XY graph setting a y axis with labels not linearly scaling |
Posted by Nellina on Jan-31-2011 18:04 |
|
I would create with perl a plot with y-axis with labels not linearly scaling. The plotted datas are linear. Scaling rule is almost the following: y=-4.2648 --> label="0.001", y=-3.7191 --> label="0.01", y=-3.0905 --> label="0.1",...,y=0-->label="50", ..., y=1.2817->label="90". The final graph will be as in the picture (done with Matlab).
In which way can I get it? Thanks in advance, Nellina.
|
Re: How to plot a XY graph setting a y axis with labels not linearly scaling |
Posted by Peter Kwan on Feb-01-2011 00:46 |
|
Hi Nellina,
You may use Axis.addLabel to put any label you like on the y-axis. For your case, it would be like (in VB/VBScript):
yAxisLabels = Array("0.001", "0.01", ......, "50", .... "90", ...)
yAxisValues = Array(-4.2648, -3.7191, ........)
'Set axis scale with no labels
Call c.yAxis().setLinearScale2(-4.5, 4.5, Array())
'Now add the custom labels
For i = 0 To Ubound(yAxisLabels)
Call c.yAxis().addLabel(yAxisValues(i), yAxisLabels(i))
Next
Hope this can help.
Regards
Peter Kwan |
Re: How to plot a XY graph setting a y axis with labels not linearly scaling |
Posted by Nellina on Feb-01-2011 01:01 |
|
Thanks a lot! Yes it can help me! |
|