comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: plot & oplot
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: plot & oplot [message #40689 is a reply to message #40688] Tue, 24 August 2004 00:52 Go to previous messageGo to previous message
Chris Lee is currently offline  Chris Lee
Messages: 101
Registered: August 2003
Senior Member
In article <cge3ri$kq6$1@agate.berkeley.edu>, "Marshall Perrin"
<mperrin+news@cymric.berkeley.edu> wrote:


> IDLmastertobe <shi_lee@hotmail.com> wrote:
>> If I was to plot a 1-d function, and wanted to do an oplot on the same
>> window, how would I hide sections of the oplot that goes underneath the
>> plot. I eventually want to do multiple oplots and hide sections that
>> fall underneath the previous oplot. Please help.
> Just plot your functions from 'back' to 'front'. Each oplot will
> overplot (hence the name!) everything that came before.
> - Marshall

Unless you want 'underneath' in the vertical axis sense, not the z-axis
sense.

You can use polyfill, with the background color, to block out anything
under the line you plot.

e.g
;some data
x=findgen(101)
y1=x
y2=100-x

plot, x,y1 ;the first data
;cover up everything underneath the second line
polyfill, [x, reverse(x)], [y2, replicate(min(y2),n_elements(x))],color=0
;plot the second line
oplot, x,y2
;replot the axis
plot, x, y1,/nodata,/noer
;

Chris
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: plot & oplot
Next Topic: Re: returning filename suffix

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Nov 30 00:23:44 PST 2025

Total time taken to generate the page: 0.64256 seconds