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

Home » Public Forums » archive » Re: Color Fonts?!?!?
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 Fonts?!?!? [message #30301 is a reply to message #30299] Wed, 17 April 2002 11:42 Go to previous messageGo to previous message
Ken Mankoff is currently offline  Ken Mankoff
Messages: 158
Registered: February 2000
Senior Member
> Date: Wed, 17 Apr 2002 12:26:45 -0600
> From: Sean Davis <sdavis@nis.lanl.gov>
> Does anyone know how to make a string have different colored fonts. I
> would like the x-axis title on a plot to have a string that has different
> colors. thanks!

I do this via multiple calls to plot, and using the /NODATA and
/NOERASE keywords. Note that each call should "build" on the previous
ones (ex: remove a "chars=2" from a later call, and it will not work)

loadct, 39
data = indgen(10)
plot, data, /nodata, color=253, xtitle='foo', chars=2
plot, data, /nodata, color=100, xticklen=1, yticklen=1, /noerase, chars=2
plot, data, /noerase, chars=2, psym=-2

I have never made color axis titles until now, but use this method all
the time to put light-gray grids behind my plots (I have one index of
my colortables set to [120,120,120]). It lets you read off the data
more accurately (without using a ruler), but is non-intrusive to the
eye. I think you could even get each letter of your title to be
different, except that it might require a FOR loop (oh no!)

-k.

--
------------------------------------------------------------ ---------------
Ken Mankoff http://lasp.colorado.edu/snoe/
http://lasp.colorado.edu/mars/
http://lasp.colorado.edu/~mankoff/ http://lasp.colorado.edu/marsrobot/
------------------------------------------------------------ ---------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Help me aviod a FOR loop!?!?
Next Topic: 24-bit color problem on Red Hat Linux 7.1

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

Current Time: Sat Oct 11 20:51:40 PDT 2025

Total time taken to generate the page: 0.64071 seconds