如何设置 Y 轴格式以显示 2000 而不是 2,标签为 MyLabel(10^3)​​?

发布于 2024-10-06 21:39:52 字数 63 浏览 0 评论 0原文

使用 ZedGraph,如何格式化 Y 轴以显示 2000 而不是 2,标签为 MyLabel(10^3)​​?

Using ZedGraph, how do I format the Y axis to show 2000 instead of 2 with a label of MyLabel(10^3)?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

雨后咖啡店 2024-10-13 21:39:52

将比例尺的格式属性设置为“#”和Mag 属性为零。例如:

 YAxis y = myPane.YAxis;
 y.Scale.Format = "#";
 y.Scale.Mag = 0;

Set the scale's Format Property to, say, "#" and the Mag Property to zero. For example:

 YAxis y = myPane.YAxis;
 y.Scale.Format = "#";
 y.Scale.Mag = 0;
聽兲甴掵 2024-10-13 21:39:52

MagAuto 属性设置为 false:

zedGraph.GraphPane.YAxis.Scale.MagAuto = false;

请注意,单击“将比例设置为默认值” ZedGraph 上下文菜单中的 MagAuto 将重置为 true。这是上下文菜单事件处理程序的一部分的来源:

public void ResetAutoScale( GraphPane pane, Graphics g )
{
    _scale._minAuto = true;
    _scale._maxAuto = true;
    _scale._majorStepAuto = true;
    _scale._minorStepAuto = true;
    _crossAuto = true;
    _scale._magAuto = true;
    //this.numDecAuto = true;
    _scale._formatAuto = true;
    pane.AxisChange( g );
}

Set the MagAuto property to false:

zedGraph.GraphPane.YAxis.Scale.MagAuto = false;

Note that clicking on "Set Scale to Default" in the ZedGraph context menu will reset MagAuto to true. This is the source of a part of the context menu event handler:

public void ResetAutoScale( GraphPane pane, Graphics g )
{
    _scale._minAuto = true;
    _scale._maxAuto = true;
    _scale._majorStepAuto = true;
    _scale._minorStepAuto = true;
    _crossAuto = true;
    _scale._magAuto = true;
    //this.numDecAuto = true;
    _scale._formatAuto = true;
    pane.AxisChange( g );
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文