[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: plotting question

**From**: |
Paul Kienzle |

**Subject**: |
Re: plotting question |

**Date**: |
Fri, 14 Mar 2003 21:54:55 -0500 |

**User-agent**: |
Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.3a) Gecko/20021212 |

Jonathan Nichols wrote:

hello all,

` i have a plotting question that i was wondering if you could help
``with.
`` i have a set of x,y pairs, each of which has a z value. i would
``like to create a 2-D plot where every x,y pair has a point associated
``with it, whose color indicates the magnitude of the z value.
`

If your dataset is uniformly sampled, you can use
an image. If it is not uniformly sampled, you can
try using griddata from octave-forge to turn it into
an image.
Alternatively, you could try scatter.m:
http://octave.sf.net/index/f/scatter.html
Only use colours 1-8. If your dataset is
large, don't use the variable marker size
option.

` ideally, i would like to be able to use the colormap feature so
``that i can use any color for the points. if this is possible, how do
``i tell the plot function to use a color from the colormap? or is it
``done with the gset command?
`

` if this is not possible, i can use the format feature of the plot()
``fuction which gives me a choice of one of the red, green, blue, cyan,
``magenta, brown colors.
`
one of the methods i have tried is the following:
plot(x1,y1,color1);
hold on
plot(x2,y2,color2);
plot(x3,y3,color3);
.....

` the problem with this is that it puts a plot legend in the upper
``right hand corner of the plot. since there are hundreds of points in
``this dataset, the entire plot is covered with "line 123" legend text.
`` if i use the above method, how do i get rid of the legend text?
`

plot(x,y,[color,";;"])
This is what scatter.m does internally.
Paul Kienzle
address@hidden
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------

**plotting question**, *Jonathan Nichols*, `2003/03/14`
**Re: plotting question**,
*Paul Kienzle* **<=**