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

Home » Public Forums » archive » Re: ps_start and color
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: ps_start and color [message #80251] Fri, 25 May 2012 09:26 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
simona bellavista writes:

>
>> Unless you are using an ancient version of the Coyote
>> Library, I don't see any way this doesn't produce
>> a red line. In fact, I don't see any possibility
>> that it doesn't produce a red line in PostScript.
>
> I downloaded the last version of the coyote library just before posting here.
>
>> So, I guess the question is. What makes you think
>> it doesn't?
>
> experimenting. It doen't work, not on my system at least.
>
> my system is linux
> the exact code I used is the following and I run it like a script:
>
> ps=1
> datacolor=cgcolor("Red",!D.table_size-4)
> filename ='~/idl/test.eps'
>
> if (ps eq 1) then ps_start, file = filename
> if (ps ne 1) then begin $
> & set_plot, 'x' $
> & window, 0, retain = 2 $
> & endif
>
> N=100
> sp = dindgen(N)
> vector1 = replicate(0.5,N)
> vector2 = replicate(0.6,N)
>
> multiplot,[1,2]
> plot, sp, vector1, xstyle=1, yr=[0,1]
> oplot, sp, vector2,color=datacolor
>
> multiplot
> plot, sp, vector1, xstyle=1, yr=[0,1]
> oplot, sp, vector2,color=datacolor
>
> multiplot,/reset
> if (ps eq 1) then ps_end

Ah, well, that's not the code you sent before. In the
code we were testing, you loaded the color AFTER you
ran PS_START. If you do it *before* you run PS_START
there is a possibility the color will be wrong, depending
upon how your machine is set up.

There would be no confusion if you specified the color
on the command line that used the color, or (a MUCH better
solution!) you used Coyote Graphics commands to draw your
graphics.

But, in your case, just moving the color definition to
after the PS_Start command will solve your problem.

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.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Pan/Zoom Line Plots with Coyote Graphics
Next Topic: ps_start and color

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

Current Time: Thu Oct 09 17:25:28 PDT 2025

Total time taken to generate the page: 1.27970 seconds