Click here to Skip to main content
14,836,361 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hii

I am working on a project in which i want to plot the data coming from serial port continuously [data more than 4 hrs]. I can draw the line graph. But I want to see the plot from start to end by scrolling. Please give me a solution.
Posted

I had a similar requirement, my solution was to use graphicspath ... I add the points to a graphics path scaled 1:1 then when drawing to the screen I use the matrix functions to scale the traces for display and the clip region to only show the part I want on screen. Works a treat and really fast.

Objects to use ( assumes g is the current graphics object)

Set

g.Clip = on screen display area as a clip region:

GraphicsPath gx = new GraphicsPath();

Add line, paths, rectangles etc ......

gx.Transform( to scale and scroll graph)

g.DrawPath( actually draw traces )


Derek
   
v3
I have something similar at work, but with data coming from ethernet.
I believe ZedGraph can help you, take a look:
http://codeabout.wordpress.com/2012/02/10/plotting-graphs-in-c-with-zedgraph-and-vs-2010/[^]
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900