I have an application (written in C) which currently uses popen() to communicate with gnuplot in order to create 2D graphs of a bunch of points. Something similiar to the following:
http://www.linuxfocus.org/English/March1998/article28.html
Well you can use opengl for this, but opengl is quite low level, and does not directly brings all features of a plotter, so it will not be “very easy”. But can be useful to provide realtime graphs.
In my case x axis represents from 0 to 90 secs.(always). Y axis represents data which comes to by application as input based on a timer. I am using GL_LINE_STRIP when I finish till 90 secs the graphs draws great. When 90 secs finishes my xaxis becomes 0 again( which i want that way). so according to GL_LINE_STRIP it will connect the 90 value of x axis back to x zero value forming a loop. which i want to break.
I am using vectors for y axis values when y value reaches 90 elements I will delete the first element and append to the last of the vector array. this way my vector size remains at 90 elements always.
glVertex(x array,yarray);using GL_LINE_STRIP
can u Help my post are there in this forum regaring opengl graphs?
Don’t quite understand what you are saying. GL_LINE_STRIP should be fine for what you’re doing. Just program in the last item explicitly if you have to.