我正在使用zedgraph绘制我的数据。我有一个MasterPane
,它有三个GraphPanes
。绘制数据后,我想同时缩放所有图形。有什么建议吗?
MasterPane master = zgc.MasterPane;
master.Title.IsVisible = true;
master.Margin.All = 10;
master.Fill = new Fill(Color.WhiteSmoke, Color.FromArgb(220, 220, 255), 45.0f);
master.PaneList.Clear();
for (int i = 0; i < numberOfPanes; i++)
{
string title = null;
GraphPane pane = new GraphPane();
master.Add(pane);
if (i == 0)
title = "";
if (i == 1)
title = "";
if (i == 2)
title = "";
if (i >= 3)
title = "" + (i - 2).ToString();
GraphSettings.PanelProperties(pane, title);
}
zgc.AxisChange();
using (Graphics g = frm.CreateGraphics())
{
master.SetLayout(g, PaneLayout.SquareColPreferred);
master.SetLayout(g, PaneLayout.SingleColumn);
master.AxisChange(g);
}
答案 0 :(得分:1)
您可以使用ZedGraph控件的.IsSynchronizeXAxes
和z.IsSynchronizeYAxes
属性来实现此目的:
zgc.IsSynchronizeXAxes = true;
zgc.IsSynchronizeYAxes = true;