ZedGraph 中的锁定轴
我使用 ZedGraph 只需单击一下即可绘制来自多个来源的数据。我需要每个图的 Y 轴始终具有相同的最大值和最小值。我需要它能够在浏览数据集时看到数据集之间的变化。就我而言,在一张图中绘制多个来源的数据是没有意义的。
我尝试像这样设置轴属性:
myPane.Y2Axis.Scale.Max = 40;
myPane.Y2Axis.Scale.MaxAuto = false;
myPane.Y2Axis.Scale.Min = -40;
myPane.Y2Axis.Scale.MinAuto = false;
我仍然看到轴自动缩放。如果这可能的话,请给我一个提示。我可能只是错过了一件小事......
(顺便说一句:我希望有人选择这个项目,它太棒了!)
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...
(by the way: I hope someone picks this project up, it's great!)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好吧,这样解决:
添加了 ZoomOut(),因为我意识到 RestoreScale() 实际上总是自动缩放...
-rb
Well, solved like this:
Added a ZoomOut(), since I realized that RestoreScale() actually always autozooms...
-rb
您打算同步您使用的所有窗格的比例吗?
如果是这样,您是否看过本教程?
第二件事是
Y2Axis
默认情况下不可见。 ZG 默认使用第一个 Y 轴 (YAxis
)。您是否手动启用了Y2Axis
?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 enabledY2Axis
manually?