View Full Version : graph plotting similiar to gnuplot??
03-28-2006, 12:08 PM
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:
I've just recently heard of openGL, so I'd like to know if there is a very easy way to use openGL for this kind of functionality?
03-29-2006, 05:32 AM
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.
Just found this, someone who wrote a patch for gnuplot to use opengl :
Here a tool like gnuplot, with optional OpenGL support for 3d graphs : http://kmatplot.sourceforge.net/
12-13-2008, 11:05 PM
I have tried everything but not working at all.
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?
12-14-2008, 01:49 PM
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.
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.