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

Home » Public Forums » archive » POLYFILL erases my tick values - solution?
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: POLYFILL erases my tick values - solution? [message #21906 is a reply to message #21867] Wed, 27 September 2000 00:00 Go to previous messageGo to previous message
John-David T. Smith is currently offline  John-David T. Smith
Messages: 384
Registered: January 2000
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


I have used:

plot,x,y,XRANGE=xr,YRANGE=yr,XSTYLE=5,YSTYLE=5,/NODATA,POSIT ION=p

to setup data coordinates in the case they are needed before the plot which
would have set them.

This brings up an interesting side problem: I have a direct graphics widget
application which undershades various parts of a plot. These shaded regions can
be moved with the mouse or arrow keys after selection with a mouse click. Since
they *underly* the plot, the only reliable way of moving them I've found is
re-shading and re-plotting at each step of the move. As you can imagine, this
causes the updates to be somewhat... unappealing. A pixmap in the normal usage
won't seem to do the job, since usually the trick is to restore some portion of
the window and then overplot some changing feature (like a rubber-band selection
outline). There is no equivalent way for putting things *under* the restored
area. One solution I've thought of is the SET_GRAPHICS_FUNCTION keyword of
device with GXor, but I can't seem to make that work (since it doesn't stay
"inside" of IDL's color table but runs the full gamut of the device's color
table). I could also use tvrd() to store the plot and the shadings without plot
separately, and OR them by hand. This saves all the replotting but at the
expense of tvrd() and tv()'ing (which may make updates just as bad or worse).

Any thoughts? Is this something which 3 lines of Object Graphics code could do
in a snap?

Thanks,

JD

--
J.D. Smith /*\ WORK: (607) 255-6263
Cornell University Dept. of Astronomy \*/ (607) 255-5842
304 Space Sciences Bldg. /*\ FAX: (607) 255-5875
Ithaca, NY 14853 \*/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Named Indices
Next Topic: Complex data type

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

Current Time: Sat Oct 11 17:20:49 PDT 2025

Total time taken to generate the page: 0.00952 seconds