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

Home » Public Forums » archive » Plot with axis and labels with different colors
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: Plot with axis and labels with different colors [message #85334 is a reply to message #85333] Thu, 25 July 2013 12:20 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Mairan Teodoro writes:

> Thanks for the suggestion. However, that's exactly the way I use to create this kind of plot (one CGIMAGE call and two CGPLOT calls).
>
> I was thinking about something like a keyword to define the color of the axis labels... something like
>
> cgPlot, dataX, dataY, axiscolor='white', axislabel='black',...

Unfortunately, the axis color and the axis label are not separated in
the underlying Plot and Axis commands in IDL. That's why you have to do
this run-around.

In object graphics, these two colors are separate, so you can do what
you like. It's rather round-about in Function Graphics, too, but it is
possible. You do it like this:

;***********************************************************
im = image(cgdemodata(7))
p = im.POSITION
p = plot(indgen(360), position=p, /current, /nodata)
axes = p.axes
for j=0,3 do axes[j].color = 'white'
for j=0,3 do axes[j].text_color = 'black'
;***********************************************************

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: smoothing spline
Next Topic: UNsharing an IDLgrImage

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

Current Time: Fri Oct 10 06:42:31 PDT 2025

Total time taken to generate the page: 0.40175 seconds