private void ShowTwinGraph(double[] data1, double[] data2)
{
GraphForm2 form = new GraphForm2();
double labelMax;
double[] label = GetLabel(out labelMax);
form.GraphL.AddEntry(label, data1, pens[0]);
form.GraphR.AddEntry(label, data2, pens[1]);
form.GraphL.SetXAxis(0, labelMax, 4, font, brush);
form.GraphR.SetXAxis(0, labelMax, 4, font, brush);
if(this.checkYAxisAuto.Checked)
{
form.GraphL.SetYAxis(0, 0, 5, font, brush);
form.GraphL.AutoScaleY();
form.GraphR.SetYAxis(0, 0, 5, font, brush);
form.GraphR.AutoScaleY();
}
else
{
double min = double.Parse(this.textYMin.Text);
double max = double.Parse(this.textYMax.Text);
form.GraphL.SetYAxis(min, max, 5, font, brush);
form.GraphR.SetYAxis(min, max, 5, font, brush);
}
form.Text = this.Text;
form.MdiParent = this.MdiParent;
form.Show();
}