简体   繁体   English

如何在C#中使用ZedGraph绘制动态曲线?

[英]How to make a dynamic curve with ZedGraph in C#?

I need to create a dynamic graph in ZedGraph where each of the points on a new curve are functions of points on the previous curve. 我需要在ZedGraph中创建一个动态图,其中新曲线上的每个点都是前一条曲线上的点的函数。 Giving the overall effect the whole curve is moving/evolving on the axis. 给整体效果,整个曲线在轴上移动/演化。

I have a loop in which I calculate the next curve based on the current using my function and I store these in a two dimensional array. 我有一个循环,使用函数可以根据当前电流计算下一条曲线,并将它们存储在二维数组中。 So, for each timestep I have all the Y-Axis values in order in my array. 因此,对于每个时间步长,我在数组中依次拥有所有的Y轴值。

I'm not sure how to go about with the actual plotting, do I need to declare a new pairpointlist for each curve/timestep? 我不知道如何与实际的绘图去,我需要声明一个新pairpointlist为每条曲线/时间步长?

I'm new to ZedGraph and I haven't been able to find any similar problems to this on the internet. 我是ZedGraph的新手 ,我还无法在互联网上找到与此类似的任何问题。 I'm a little stuck. 我有点卡住了。

Any help is appreciated, cheers! 感谢您的帮助,干杯!

Zedgraph has got an inbuilt option for Dynamic or Real time data plotting, RollingPointPairList Zedgraph具有动态或实时数据绘图的内置选项RollingPointPairList

You just have to change the list data within the timer tick event, and you could also control the speed of rolling data. 您只需要在计时器滴答事件中更改列表数据,就可以控制滚动数据的速度。

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

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