Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

bug in waveform graph concerning axis scale type (log to lin)!?

Hi all,
 
I'm using waveformgraph 8.0 in .NET 2003.
 
It seems there's a bug in waveformgraph when assigning a linear scale type (y-axis) after the data has been plotted in log. scale. The axis labels are updated correctly, but the plotted data are not redrawn. The graph shows then the linear axis scale but the plot is still showing the log. scaled data. Resize the waveform graph afterwards corrects the problem.
BTW, plotted data which is scaled linear and changed to log. scale afterwards works correctly.
 
It is quite simple to reproduce it:
 
just put a waveform graph on a form and two buttons. in Button 1:
 

waveformGraph1.YAxes[0].ScaleType = ScaleType.Logarithmic;

double[] arrD = new double[5]{0.0145,0.25,3,14,105};

waveformGraph1.PlotY(arrD);

 

and then in button 2:

 

waveformGraph1.YAxes[0].ScaleType = ScaleType.Linear;

 

Is this a known problem? Who knows a solution or a (simple:) workaround?

 

Best regards

Andy

0 Kudos
Message 1 of 2
(2,854 Views)

When you take the code here for the Buttons, then you see the correct scale of y axis

static void Main()

{

Application.Run(new Form1());

}

private void button2_Click(object sender, System.EventArgs e)

{

waveformGraph1.YAxes[0].ScaleType=ScaleType.Logarithmic;

double[] data = new double[5]{0.0145,0.25,3,14,105};

waveformGraph1.PlotY(data);

}

private void button1_Click(object sender, System.EventArgs e)

{

waveformGraph1.YAxes[0].ScaleType=ScaleType.Linear;

double[] data = new double[5]{0.0145,0.25,3,14,105};

waveformGraph1.PlotY(data);

waveformGraph1.Refresh();

}

0 Kudos
Message 2 of 2
(2,832 Views)