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 #40688] Tue, 24 August 2004 01:16 Go to previous message
Paolo Grigis is currently offline  Paolo Grigis
Messages: 171
Registered: December 2003
Senior Member
Christopher Lee wrote:
> 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

For simple plots, one could even try

plot,x,y1
oplot,x,y2>y1


Paolo
[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 Oct 12 11:24:41 PDT 2025

Total time taken to generate the page: 1.59991 seconds