iterator based plot

T

toton

Hi,
for my project I needs a few plots to visualize the data (mostly x-y
plot) . Most of the existing plotting library either copy the data and
do plotting, or takes a data pointer to an 2d x-y array, and plots it
(without copying). As my data set is not so trivial (sometimes it is
vector, sometimes list etc), and x, y are not fixed. so I want to have
a plot as generic one, which take begin & end iterator, iterate over it
and show the result.
Thus, say I have data in the form vector<Point> , and where
class Point{
int x;
int y;
int z;
int i;
};
and have ctor, and getters.
Now, I want to specify, two iterators for the vector (or any other
thing which can give two iterators, one of the forward iterator, or
reverse iterator is a minimum condition), and also what to plot. I dont
want to hardcode it saying Point "need to have" some x() and y() .
Rather than I want to say, use x() and y() or y() and i() as data. Some
sort of casting wil be fine.

Anyone can give an idea? or point to a link for it (or already existing
open-source library) ?
I NO-NOT need the graphics code, or how to implement the plot . I am
looking for how to interface data to plot.

Any help appreciated.
Thanks
abir
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top