|
From: fred <far...@ya...> - 2005-05-20 00:33:54
|
Hello,
I'm using the wxWidgets binding of plPlot, wxPlot,
but I think my question is general enough to post
here. I apologize in advance if this question is
obvious.
I have a three data arrays, x[], y[], z[], all of
equal length. I would like to plot the x, y arrays
against each other using z to color the points. I
don't think that a contour plot will work here, as the
z[] values are discontinuous and non-linear in x and
y. For those of you who use R, I am basically trying
to call something like:
plot( x, y, col = z)
In plplot, I tried the following:
for( int i = 0; i < NUM_POINTS; i++ ){
myPlot->col( z[i] );
myPlot->poin( 1, x[i], y[i], 1 );
}
This kind of works, but it is slow and inelegant and
some of the colors don't seem to display properly.
Moreover, a continuous color range along the lines
"Color Map 1" from the documentation would be
preferable. I think that I may want to use a shade
plot, but it is not well documented, and I only want
to color the individual points.
Advice? Suggestions? Thanks in advance.
Fred
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
|