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

Home » Public Forums » archive » ps_start and color
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
ps_start and color [message #80260] Fri, 25 May 2012 08:28 Go to next message
simona bellavista is currently offline  simona bellavista
Messages: 56
Registered: December 2009
Member
Hello,

I did a plot like that

ps_start, file=filename
datacolor1=cgcolor("Red",!D.table_size-4)

multiplot,[1,2]
plot, vector1, ytitle='F', xstyle=1
oplot, vector2, color=datacolor1

multiplot
plot, vector1, xtitle='v[km/s]', xstyle=1
oplot, vector2,color=datacolor1

multiplot,/reset
ps_end

but I cannot see the red line on the ps, while I can see when I use x.
How do I get color in ps?

thank you
Re: ps_start and color [message #80345 is a reply to message #80260] Fri, 25 May 2012 10:48 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
simona bellavista writes:

> OK, I solved everything using the cg commands!
> these colors look like a mess

Yes, colors can be a mess. One of the hardest
things to learn in IDL, certainly. You may
want to get a book. It would not be a mistake
to think that ALL of Coyote Graphics is devoted
to making sense of color! And you can read all
about it, in excruciating detail here:

http://www.idlcoyote.com/books/index.php

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: ps_start and color [message #80346 is a reply to message #80260] Fri, 25 May 2012 10:12 Go to previous message
simona bellavista is currently offline  simona bellavista
Messages: 56
Registered: December 2009
Member
OK, I solved everything using the cg commands!
these colors look like a mess
Re: ps_start and color [message #80347 is a reply to message #80260] Fri, 25 May 2012 10:22 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> You want this:
>
> cgplot, sp, vector1, xstyle=1, yr=[0,1], /nodata
> cgplot, sp, vector1, color = 'red', /over
> cgplot, sp, vector2, color='blue', /over

Or, even more succinctly:

cgplot, sp, vector1, xstyle=1, yr=[0,1], color='red'
cgplot, sp, vector2, color='blue', /over

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: ps_start and color [message #80348 is a reply to message #80260] Fri, 25 May 2012 10:17 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
simona bellavista writes:

> Thank you very much, a stupid mistake.
> but now I want to have a line blue and one red and I do
>
> cgplot, sp, vector1, xstyle=1, yr=[0,1], /nodata
> cgplot, sp, vector1, color = datacolor1, /over
> cgplot, sp, vector2, color=datacolor2 , /over
>
> But I both line in datacolor1 ??

You want this:

cgplot, sp, vector1, xstyle=1, yr=[0,1], /nodata
cgplot, sp, vector1, color = 'red', /over
cgplot, sp, vector2, color='blue', /over

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: ps_start and color
Next Topic: Interpol asymmetric?

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

Current Time: Wed Oct 08 15:49:34 PDT 2025

Total time taken to generate the page: 0.00740 seconds