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

Home » Public Forums » archive » Re: COLOR BAR
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: COLOR BAR [message #2550 is a reply to message #2538] Tue, 26 July 1994 10:20 Go to previous messageGo to previous message
mark_cadwell is currently offline  mark_cadwell
Messages: 10
Registered: February 1994
Junior Member
In article <312i3o$o98@news.service.uci.edu>, vshvetsk@fourier.oac.uci.edu
(Victor Shvetsky) wrote:

>
> I was wondering if anyone has a routine for widgets that would plot a nice
> color bar AND put some value on it. I can create a color bar, but I am not able to put text on it NICELY, unless I use XYOUTS.
> any suggestions would be greatly appreciated.

--
I made a routine that created a color coded legend (a color bar) that
went along with a contour plot. I did it by defining a new bar-shaped
drawing window, using the plot function to draw rectangular areas within
the drawing window, and using polyfill to fill in the areas with their
respective colors. Finally, I used xyouts to write text and/or numeric
data into each color area. The text color was defined as either black or
white, depending on which color would contrast best with the color in the
individual rectangular areas.
Drawing the areas and the text fields was a simple matter of setting up
a loop with changing y values (my color bar was vertical).
----------------------------------
mark_cadwell@qmail4.trw.sp.com
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: IDL 3.6.1 does not start on AIX
Next Topic: Re: MAP=0 and EDITABLE conflict

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

Current Time: Sun Oct 12 00:49:25 PDT 2025

Total time taken to generate the page: 0.71808 seconds