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

Home » Public Forums » archive » Unequally spaced ticklabels with the FSC_COLORBAR function
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Unequally spaced ticklabels with the FSC_COLORBAR function [message #86366] Thu, 31 October 2013 01:49 Go to previous message
Karlo Janos is currently offline  Karlo Janos
Messages: 31
Registered: July 2008
Member
Hi,

I have found an issue with the FSC_COLORBAR function.
I wondered why the ticklabels were not distributed equally in the given
range in my example (the line with the "levels" variable is taken from
"fsc_colorbar__define.pro"):

IDL> minval = 46.8614502
IDL> maxval = 46.8615112
IDL> divisions = 10
IDL> levels = minval >
(INDGEN(divisions+1)*(maxval-minval)/divisions+minval) < maxval
IDL> pm, levels, FORMAT='(F0.6)'
46.861450
46.861458
46.861462
46.861469
46.861473
46.861481
46.861488
46.861492
46.861500
46.861504
46.861511


The reason is that when I call the function with "divisions" being an
integer the above result occurs. A change to a DOUBLE value yields the
correct result:

IDL> divisions = 10d0
IDL> levels = minval >
(INDGEN(divisions+1)*(maxval-minval)/divisions+minval) < maxval
IDL> pm, levels, FORMAT='(F0.6)'
46.861450
46.861456
46.861462
46.861469
46.861475
46.861481
46.861487
46.861493
46.861499
46.861505
46.861511
IDL>


David, if you are reading this, please consider a floating point
variable for the division by the variable "divisions".

Regards

Karlo
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: IDL 8.2 IDLnetURL insight
Next Topic: Airy function implementation?

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

Current Time: Wed Oct 08 16:02:22 PDT 2025

Total time taken to generate the page: 0.00452 seconds