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

Home » Public Forums » archive » Multicolored dashed lines???
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: Multicolored dashed lines??? [message #45691 is a reply to message #45551] Thu, 22 September 2005 05:23 Go to previous messageGo to previous message
Haje Korth is currently offline  Haje Korth
Messages: 651
Registered: May 1997
Senior Member
Good morning,
Thanks for everyone's help. Both Matt's and Bob's solutions work. I ran into
an additional problem, which made me go with the PLOTS procedure and the
color array Bob suggested.

The problem is that if the array to be plotted has a lot of elements, say
100000, the long dashed lines are turned into tiny pixels. This is clearly a
bug in IDL (this is v6.2 on Windoze) since the appearance of the line should
be independent of the size of the array. Right?

However, Bob's solution can be adapted to create a workaround to the
problem. That, is create the pattern first using a smaller array and then
blow it up with congrid. In the solution below there are always 100 dashes:

plots,findgen(100000l),findgen(100000l) +
5,linestyle=5,color=congrid((findgen(100) mod 2)*255,100000l)


Thanks and Cheers,
Haje


"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
>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Spin button widget??
Next Topic: Crisp characters in iTools

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

Current Time: Fri Dec 05 04:43:35 PST 2025

Total time taken to generate the page: 0.63727 seconds