tags:

views:

199

answers:

2

Hi, I've used ZedGraph to plot data from several sources with a single click. I need the Y-axes to always have the same max and min-values for each plot. I need this to be able to see changes between datasets as I flip through them. In my case, it would not make sense to plot data from several sources in one graph.

I've tried to set axis properties like this:
myPane.Y2Axis.Scale.Max = 40; myPane.Y2Axis.Scale.MaxAuto = false; myPane.Y2Axis.Scale.Min = -40; myPane.Y2Axis.Scale.MinAuto = false;

I still see the axes beeing auto scaled. Please give me a hint if this is possible or not. I probably only miss a small thing...

-roger

(by the way: I hope someone picks this project up, it's great!)

A: 

Well, solved like this:

        zGC.AxisChange();
        zGC.RestoreScale(myPane);
        zGC.ZoomOut(myPane);

Added a ZoomOut(), since I realized that RestoreScale() actually always autozooms...

-rb

Roger
A: 

Is your intention to synchronize the scales of all panes that you use? If so, have you seen this tutorial?

The second thing is that the Y2Axis is not visible by default. ZG uses by default first Y axis (YAxis). Have you enabled Y2Axis manually?

Gacek