ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Scale range for Y-Axis
Posted by Ariffin Hasan on Aug-23-2011 00:33
Attachments:
Hi Peter

I am plotting a linear graph where the scale of the y-axis id user defined. However, for some
values defined I get the actual scale plotted to be slightly higher. This happens only for
certain values.

Example: See attached image of the graph
Y-Axis Scale is -0.15 to 0.14
Plotted scale: -0.2 to 0.2

The command I used in VB.NET is c.yAxis.setLinearScale(-0.15, 0.14). Based on the other
postings, i tried using  c.yAxis.setAutoScale(0, 0, 0) after calling setLinearScale but it made
no difference.

I need the graph to be plotted in the scale specified in the y-Axis. Your help is very much
appreciated. Thanking you
SILMS.jpg

  Re: Scale range for Y-Axis
Posted by Peter Kwan on Aug-23-2011 02:43
Hi Ariffin,

By default, if you do not fully specify the axis scaling configuration (which includes the axis range as well as the tick spacing), ChartDirector may adjust the axis range so that it starts and ends at a tick position.

For your case, there are two methods:

(a) Add a line "c.yAxis().setRoundIng(False, False)". This will disable ChartDirector to adjust the axis range to start and end at tick positions.

or

(b) Use "c.yAxis().setLinearScale(-0.15, 0.14, 0.05)". As the tick position is specified, ChartDirector will not adjust the axis range.

Hope this can help.

Regards
Peter Kwan

  Re: Scale range for Y-Axis
Posted by Ariffin Hasan on Aug-24-2011 00:55
Thanks Peter, it works like a charm now....