iterator based plot

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • toton

    iterator based plot

    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

Working...