Thank you all :) With your feedback I have been able to get my application working quite well!


On 9/18/07, Maurice LeBrun <> wrote:
Charles Parker writes:
> Hello plplot community :^)
> I have two questions w/ regards to the functionality of the plplot C++
> bindings.
> First, is it possible to plot single pixels in scatter plot (plpoin)? I've
> tried using a lot of the different symbols and changing the size of those
> symbols (with plssym), but I can't seem to find a combination that will just
> turn on a single pixel for each data point I plot.

There is a trick that works fine for the xwin driver.  But the "points" vanish
for e.g. the ps driver, so YMMV.  From plysm.c --

* void plpoin()
* Plots array y against x for n points using ASCII code "code".
* code=-1 means try to just draw a point.  Right now it's just a move and
* a draw at the same place.  Not ideal, since a sufficiently intelligent
* output device may optimize it away, or there may be faster ways of
* doing it.  This is OK for now, though, and offers a 4X speedup over
* drawing a Hershey font "point" (which is actually diamond shaped and
* therefore takes 4 strokes to draw).

c_plpoin(PLINT n, PLFLT *x, PLFLT *y, PLINT code)

> Second, I'm going to be plotting about 5000 data points or so, the problem
> is that the way my data are structured, the points I need to plot are not
> stored sequentially in memory. I have data with about 15 parameters per
> point, and I only want to plot points (the x and y are two of the
> parameters) that satisfy some filtering criteria. Am I better off simply
> taking the memory and performance hit to create an additional data structure
> in which these data are sequential? Or can I simply call plpoin to plot each
> individual point? In the latter case I would loop through the data only once
> and plot points as I found them, whereas in the former there is the extra
> overhead of creating the data structure and copying the data before I can
> plot it.

Calling plpoin for each point separately should be fine.

Maurice LeBrun