Re: polyfill [message #66624 is a reply to message #2468] |
Mon, 01 June 2009 12:21  |
penteado
Messages: 866 Registered: February 2018
|
Senior Member Administrator |
|
|
I think the transparency option of polyfill only works on the Z
buffer. The problem then is that the Z buffer is a bitmap device, so
you could only copy the contents from the Z buffer to make a bitmap
instead of a vector eps, which is usually ugly for plots.
You could make a transparent fill in a vector eps using iplot, instead
of plot and polyfill. In iplot, you would only need to make the two
lines to be a single one (joining the end of the first with the
beginning of the second), and use the /fill_background option. As an
example:
x=dindgen(25)*!dpi/24d0
y=sin(x) ;creates the first y(x) line
y2=y-0.2 ;creates the second y(x) line
iplot,x,x/!dpi ;plots a line to serve as background
;plot the filled area with half transparency
iplot,[x,reverse(x)],[y,reverse(y2)],/fill_background,$
fill_color=[255,0,0],fill_transparency=50,/over
;plots another filled area with zero transparency
iplot,[x,reverse(x)],1d0-[y,reverse(y2)],/fill_background,$
fill_color=[0,0,255],fill_transparency=0,/over
On Jun 1, 3:08 pm, mandril...@yahoo.co.uk wrote:
> Dear all,
>
> I'm doing an eps graph and I'm using polyfill to fill the area between
> two lines. However I would like the area to be gray transparent, so I
> can still see what's below the filled part. How can I do?
>
> I'm using this simple line, tryed the keyword transparent but it seems
> not to be my case
>
> polyfill,[6000,6250,6250,6000],[1.215,1.215,1.406,1.406]
>
> Thanks!
> M.
|
|
|