繁体   English   中英

ZedGraph:如何在X轴(而非日期)中添加时间(微秒)

[英]ZedGraph: How to add time (usecs) in X-Axis (not date)

目前,我的图形仅在x轴上显示索引,而在y轴上显示电流。 现在,我向图形函数添加了其他参数(NumberOfPoints = 1024,TimeImtervall = 0.0003s)。

我最后想要的是x轴显示时间值而不是索引。

但是我找到了唯一的示例,其中找到了如何添加日期。

它与“ XAxis.Type”和“ XAxis.Scale.Format”有关,但是我还没有发现如何做到这一点。

如果您想要日期/时间,我想您需要使用XAxis.Type DateDateAsOrdinal 在这种情况下, XAxis.Scale.Format应该可以工作,例如,设置为“ HH:mm”。

http://zedgraph.sourceforge.net/documentation/default.html

尝试这个:

private void Form1_Load(object sender, EventArgs e)
    {
        GraphPane myPane = zedGraphControl1.GraphPane;

        myPane.XAxis.Title.Text = "Time(sec)";

        myPane.XAxis.Scale.Format ="f4";
        myPane.XAxis.Type = AxisType.Linear;

        myPane.XAxis.Scale.Min = 0;
        myPane.XAxis.Scale.Max = 0.3072;

        myPane.AxisChange();

        zedGraphControl1.Invalidate();
    }

您需要放大才能看到图中的millimicro秒。

Edit:

自定义zedgraph比例尺格式

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM