簡體   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