Reputation: 11
I use Zedgraph in order to plot, and I use AxisChange();
in order to auto-scale my graph.
My problem : I'd like to always see 0 to 10 on Y scale even After I go down or UP (auto-scale) , but I'd like always keep this value showed.
Here is an example of what I have now :
Here a screen shot of what I'd like to change (I want always see 0 to 10) even I have no value...
Sorry I wasn't clear enough... My goal is to have a graph that display AT least 0 to 10 in the Yaxis (always). but if the values goes down (0 to -100) or up (10 to 100), the graph auto scale the Y axis and show more values. For example even I've the value oscillating around "100" during 2 mins, I want to see my scale 0 to 110.
I don't know if it's possible or not?
In fact as soon as I put :
myPane.YAxis.Scale.Min = 0;
myPane.YAxis.Scale.Max = 10;
The auto scale stop working ...
Thanks for your help
Upvotes: 1
Views: 6508
Reputation: 2070
You can manually set 'Y' axis as follows,
myPane.YAxis.Scale.Min = 0;
myPane.YAxis.Scale.Max = 10;
myPane.AxisChange();
zedGraphControl1.Invalidate();
and if you want to reverse the scale set the 'IsReverse' property to 'True'
myPane.YAxis.Scale.IsReverse = true;
Upvotes: 4