ZedGraphControl轴值范围
我添加ZedGraphControl并显示到0-320范围ZedGraphControl轴值范围
了曲线图,我的C#.NET项目
在此图中的x值变为运行时我想只显示该区域。对于我禁用滚动,缩放也
当使用ZedGraphControl.AxisChange();它的功能显示其他X系列也
如何只查看感兴趣的领域
太感谢你了
回答:
样品下面的代码应该回答你的问题。
public virtual void UpdateGraph(double[] xvals, double[] yvals, double minX, double maxX) {
zedGraphControl1.GraphPane.XAxis.Scale.MaxAuto = false;
zedGraphControl1.GraphPane.XAxis.Scale.MinAuto = false;
zedGraphControl1.GraphPane.XAxis.Scale.Min = minX;
zedGraphControl1.GraphPane.XAxis.Scale.Max = maxX;
zedGraphControl1.GraphPane.YAxis.Scale.Min = 0;
zedGraphControl1.GraphPane.YAxis.Scale.Max = getMax(yvals, xvals, minX, maxX); //get y-value max within the X-value range
updateZedgraphControl(xvals, yvals);
}
protected virtual void updateZedgraphControl(double[] xvals, double[] yvals)
{
zedGraphControl1.GraphPane.CurveList.Clear();
zedGraphControl1.GraphPane.AddCurve(this.curveTitle, xvals, yvals, Color.Black, SymbolType.None);
this.zedGraphControl1.AxisChange();
this.zedGraphControl1.Refresh();
}
以上是 ZedGraphControl轴值范围 的全部内容, 来源链接: utcz.com/qa/259483.html