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

Home » Public Forums » archive » Re: POLYFILL erases my tick values - solution?
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
Re: POLYFILL erases my tick values - solution? [message #21852] Sun, 24 September 2000 23:23
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Andrew wrote:
>
> Dear c.l.i-p,
>
> I am using POLYFILL to shade various regions of an X-Y plot different
> shades of grey. I use PLOT (with /nodata) to draw the axes, then I
> use PLOTS to draw a bunch of lines, etc. (In this case, I'm making a
> simple diagram, not really plotting data, but the question is pretty
> general.)
>
> I'm making PostScript output so I am limited to solid colors
> as opposed to patterns (is there a good reason for that???), but
> so far that's not my real problem.
>
> The problem is that POLYFILL seems to obliterate everything in
> its path, including axis tick values. For the lines I draw, there is
> an easy solution: I just shade first, then draw. But I am working with
> \DATA coordinates, so I'm quite sure (???) I have to PLOT before I can
> POLYFILL, hence the problem that the tick values are over-shaded.
>
> Even the RSI "Using IDL" manual, 1998 paper version, p. 190,
> shows a (very ugly!) example of shading that erases tick values.
>
> The best solution I have found is to use the AXIS procedure
> after POLYFILL, to re-draw the axis.
>
> IS THIS THE BEST SOLUTION?
>
> TIA,
> Andrew
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.

That's true.
But you can use first a routine which will set the data coordinates to
the plot.
This is done with plot and the keyword /nodata.

regards

Reimar Bauer

--
R.Bauer

Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
Re: POLYFILL erases my tick values - solution? [message #21862 is a reply to message #21852] Fri, 22 September 2000 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Craig Markwardt (craigmnet@cow.physics.wisc.edu) writes:

> In the end I decided it's not so bad. :-)

I often find that the only solution becomes
the most attractive solution as time goes on. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: POLYFILL erases my tick values - solution? [message #21864 is a reply to message #21862] Fri, 22 September 2000 00:00 Go to previous message
Liam E. Gumley is currently offline  Liam E. Gumley
Messages: 378
Registered: January 2000
Senior Member
Andrew <noymer@my-deja.com> wrote in message
news:8qgda2$ml8$1@nnrp1.deja.com...
> I am using POLYFILL to shade various regions of an X-Y plot different
> shades of grey. I use PLOT (with /nodata) to draw the axes, then I
> use PLOTS to draw a bunch of lines, etc. (In this case, I'm making a
> simple diagram, not really plotting data, but the question is pretty
> general.)
>
> I'm making PostScript output so I am limited to solid colors
> as opposed to patterns (is there a good reason for that???), but
> so far that's not my real problem.
>
> The problem is that POLYFILL seems to obliterate everything in
> its path, including axis tick values. For the lines I draw, there is
> an easy solution: I just shade first, then draw. But I am working with
> \DATA coordinates, so I'm quite sure (???) I have to PLOT before I can
> POLYFILL, hence the problem that the tick values are over-shaded.
>
> Even the RSI "Using IDL" manual, 1998 paper version, p. 190,
> shows a (very ugly!) example of shading that erases tick values.
>
> The best solution I have found is to use the AXIS procedure
> after POLYFILL, to re-draw the axis.
>
> IS THIS THE BEST SOLUTION?

Here's another solution:

;- Make sure decomposed color is off, and load grayscale
device, decomposed=0
loadct, 0

;- Set plot position (normal coordinates)
p = [0.1, 0.1, 0.9, 0.9]

;- Fill plot window
polyfill, [p[0], p[2], p[2], p[0], p[0]], [p[1], p[1], p[3], p[3], p[1]], $
/normal, color=(0.5 * !d.table_size)

;- Create plot
plot, indgen(10), /noerase, position=p

Cheers,
Liam.
http://cimss.ssec.wisc.edu/~gumley
Re: POLYFILL erases my tick values - solution? [message #21865 is a reply to message #21862] Fri, 22 September 2000 00:00 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
Andrew <noymer@my-deja.com> writes:

> Dear c.l.i-p,
>
> I am using POLYFILL to shade various regions of an X-Y plot different
> shades of grey. I use PLOT (with /nodata) to draw the axes, then I
> use PLOTS to draw a bunch of lines, etc. (In this case, I'm making a
> simple diagram, not really plotting data, but the question is pretty
> general.)
>
> I'm making PostScript output so I am limited to solid colors
> as opposed to patterns (is there a good reason for that???), but
> so far that's not my real problem.
>
> The problem is that POLYFILL seems to obliterate everything in
> its path, including axis tick values. For the lines I draw, there is
> an easy solution: I just shade first, then draw. But I am working with
> \DATA coordinates, so I'm quite sure (???) I have to PLOT before I can
> POLYFILL, hence the problem that the tick values are over-shaded.
>
> Even the RSI "Using IDL" manual, 1998 paper version, p. 190,
> shows a (very ugly!) example of shading that erases tick values.
>
> The best solution I have found is to use the AXIS procedure
> after POLYFILL, to re-draw the axis.
>
> IS THIS THE BEST SOLUTION?

Yes, this is what I do.

In the end I decided it's not so bad. :-)

Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
Re: POLYFILL erases my tick values - solution? [message #21866 is a reply to message #21862] Fri, 22 September 2000 00:00 Go to previous message
noymer is currently offline  noymer
Messages: 65
Registered: June 1999
Member
I forgot to say, I'm using IDL 5.3 direct graphics.

And I should have said "tick marks" not "tick values".

A.


Sent via Deja.com http://www.deja.com/
Before you buy.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Announcement from RSI
Next Topic: Re: HDF_SD_START: Unable to start the HDF-SD interface.

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

Current Time: Sat Oct 11 08:42:48 PDT 2025

Total time taken to generate the page: 0.16382 seconds