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

Home » Public Forums » archive » Re: COLORBAR label too long
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: COLORBAR label too long [message #55353 is a reply to message #55351] Fri, 17 August 2007 14:03 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Ryan. writes:

> All of a sudden I am getting labels with 4 digits after the decimal.
> So now they are overlapping one another. Before I didn't have any.
> Does anyone know why this would happen? It worked fine after I put in
> the STRTRIM function and then I was working on something else (my
> function that created the particular color table for this routine). I
> know this is vague but am I missing any intricacy of IDL or did I
> accidentally change something?
>
> ticks = StrTrim((SINDGEN((clrTableLength/5)+1)*5)-(clrTableLength/2) ,
> 2) <- David's line of code
> ticks = STRTRIM((SINDGEN((clrTableLength/5)+1)*5)-(clrTableLength/2) ,
> 2) <- My line of code

This all has to do with the "natural length" of a number
and how these numbers are converted to strings. It can be
a mess. :-)

My guess is that one of your numbers changed from an
integer to a float, and it is that number you are using
in your strings.

My suggestion would be to use a program like NUMBER_FORMATTER,
which takes some of the mystery out of what you are going
to end up with. Or, alternatively, you can convert your numbers to
strings with the STRING function and the proper FORMAT
keyword. (Good luck!)

http://www.dfanning.com/programs/number_formatter.pro

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Adjusting Trackball Radius
Next Topic: MODIS spectral radiance

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

Current Time: Fri Oct 10 16:28:30 PDT 2025

Total time taken to generate the page: 0.12466 seconds