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

Home » Public Forums » archive » Re: Multicolored dashed lines???
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
Re: Multicolored dashed lines??? [message #45548] Wed, 21 September 2005 14:19
R.G. Stockwell is currently offline  R.G. Stockwell
Messages: 363
Registered: July 1999
Senior Member
"Haje Korth" <haje.korth@nospam.jhuapl.edu> wrote in message
news:dgsgmn$s9c$1@aplcore.jhuapl.edu...
> Hi,
> Before I start coding something really crappy, I wanted to ask if anyone
> has a routine that can plot a multicolored dashed line (e.g.,
> black-white)? The purpose is to have a line that can be seen against
> arbitrary background colors, such as used in a color spectrogram.
>
> Thanks,
> Haje

Hi Haje,
perhaps something along the lines of:
(using the findgen functions as x and y)
plots,findgen(100),findgen(100) + 5,linestyle=5,color=(findgen(100) mod
2)*255

ie make an array of color that = [0,255,0,255] so that the dashes go
[black,white,black,white]

(at least for my color table, color=255 is white]. Easy to extend tothree or
more

colors too.

I've had to make symbols that could be seen both against a white background
and a black background,

so I just make a white circle, and overplotted with a black cross, something
like that would work too.



Cheers,

bob
Re: Multicolored dashed lines??? [message #45549 is a reply to message #45548] Wed, 21 September 2005 14:16 Go to previous message
mankoff is currently offline  mankoff
Messages: 131
Registered: March 2004
Senior Member
An ancient discussion on multi-colored fonts might lend some insight?

http://groups.google.com/group/comp.lang.idl-pvwave/browse_f rm/thread/5e7836fc0cb7dbc3

-k.
Re: Multicolored dashed lines??? [message #45550 is a reply to message #45549] Wed, 21 September 2005 14:03 Go to previous message
savoie is currently offline  savoie
Messages: 68
Registered: September 1996
Member
"Haje Korth" <haje.korth@nospam.jhuapl.edu> writes:

> Hi, Before I start coding something really crappy, I wanted to ask if
> anyone has a routine that can plot a multicolored dashed line (e.g.,
> black-white)? The purpose is to have a line that can be seen against
> arbitrary background colors, such as used in a color spectrogram.

Would this work?


x = randomn( 3, 333 )

plot, x, BACKGROUND = fsc_color( 'red', 1 ), $
COLOR = fsc_color( 'blue', 2 )

oplot, [ 0, 1000 ], [ 0, 0 ], $
COLOR = fsc_color( 'black', 3 )

oplot, [ 0, 1000 ], [ 0, 0 ], $
COLOR = fsc_color( 'white', 3 ), LINESTYLE = 2



See dfanning.com for fsc_color.pro

Matt

--
Matthew Savoie - Scientific Programmer
National Snow and Ice Data Center
(303) 735-0785 http://nsidc.org
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Resizing arrays
Next Topic: Spin button widget??

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

Current Time: Sun Oct 12 12:53:27 PDT 2025

Total time taken to generate the page: 0.64092 seconds