POLYFILL [message #2468] |
Wed, 13 July 1994 04:24  |
ajaunsen
Messages: 5 Registered: February 1993
|
Junior Member |
|
|
I have made a histogram plotting routine, which fills the histogram with
slashed lines using the PATTERN option in POLYFILL (instead of /LINE_FILL).
This was done in the same manner as described in the IDL manual.
>pro BOX
>ww=bytarr(10,10)
>for i=0,9 do ww(i,i)=255
>polyfill,[x0,x0,x1,x1],[y0,y1,y1,y0],pattern=ww
>end
The problem arrived, when I wanted the histogram out on a PS file...
..the area where the lines where are in the postscript file turned into
completly dark areas.
DOES ANYONE HAVE A SOLUTION ?
Andreas O. Jaunsen
|
|
|
Re: POLYFILL [message #2586 is a reply to message #2468] |
Mon, 18 July 1994 10:56   |
rmm
Messages: 4 Registered: June 1994
|
Junior Member |
|
|
In article <300iu9$2id@hermod.uio.no>, ajaunsen@leda.uio.no (Andreas Ortmann Jaunsen) writes:
|>
|>
|>
|> I have made a histogram plotting routine, which fills the histogram with
|> slashed lines using the PATTERN option in POLYFILL (instead of /LINE_FILL).
|> This was done in the same manner as described in the IDL manual.
|>
|> >pro BOX
|> >ww=bytarr(10,10)
|> >for i=0,9 do ww(i,i)=255
|> >polyfill,[x0,x0,x1,x1],[y0,y1,y1,y0],pattern=ww
|> >end
|>
|> The problem arrived, when I wanted the histogram out on a PS file...
|> ..the area where the lines where are in the postscript file turned into
|> completly dark areas.
|>
|> DOES ANYONE HAVE A SOLUTION ?
|>
|> Andreas O. Jaunsen
The Postscript device has a much higher resolution than, say, the X graphics
device. I suspect that your problem is that the ww array is just not big enough
for Postscript output, resulting in the lines being so close together at the
higher resolution that it looks like its filled. Try making ww=bytarr(100,100)
and see what happens. You can adjust it as suits you.
Robert M. Moss, Ph.D.
Texaco Inc.
rmmoss@texaco.com
|
|
|
|
|
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.
|
|
|