Re: Same color: graph and errorbars [message #30401] |
Fri, 26 April 2002 04:36 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Thomas Ohde (thomas.ohde@io-warnemuende.de) writes:
> I want plot a graph with errorbars where the graph has the same color like
> the errorbars.
>
> Example:
>
> x=[1,2,3]
> y=[1,2,3]
> error = [0.1,0.2,0.1]
>
> loadct, 39
> plot,x,y,xrange[0,4], yrange[0,4], color=0, background = 255
> errplot,x,y+error,y-error
>
> Now the graph is black and the errorbars are white, but they should be
> black.
> In ERRPLOT it is not allowed to use the KEYWORD color = 0 (black).
If you didn't want to bother with the one minute job
of adding a COLOR keyword to ERRPLOT, you could always
do this:
loadct, 39
!p.color = 0
!p.background = 255
plot,x,y,xrange=[0,4], yrange=[0,4]
errplot,x,y+error,y-error
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|