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

Home » Public Forums » archive » POLYFILL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
POLYFILL [message #2468] Wed, 13 July 1994 04:24 Go to next message
ajaunsen is currently offline  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 Go to previous messageGo to next message
rmm is currently offline  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 #45713 is a reply to message #2468] Thu, 29 September 2005 23:02 Go to previous messageGo to next message
peter.albert@gmx.de is currently offline  peter.albert@gmx.de
Messages: 108
Registered: July 2005
Senior Member
Hi Jill,

what about

idx = where(z eq -9999, n)
if n gt 0 then zcolors[idx] = grayColor

before you enter the for-loop?

Regards,

Peter
Re: polyfill [message #45789 is a reply to message #45713] Mon, 03 October 2005 10:38 Go to previous messageGo to next message
psbeps is currently offline  psbeps
Messages: 8
Registered: March 2005
Junior Member
Yes, that worked!

Thank you,

Jill
Re: polyfill [message #66624 is a reply to message #2468] Mon, 01 June 2009 12:21 Go to previous message
penteado is currently offline  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.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Super Resolution image IDL
Next Topic: Re: changing the pixel values in raster

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

Current Time: Wed Oct 08 16:00:50 PDT 2025

Total time taken to generate the page: 0.00832 seconds