Log histogram = FAIL [message #71962] |
Mon, 02 August 2010 11:17  |
Haje Korth
Messages: 651 Registered: May 1997
|
Senior Member |
|
|
Plotting log histograms using new graphics system in IDL does not work
right. Try
IDL> a=findgen(10)+1
IDL> b=10./a^2
IDL> b[8]=0
IDL> p=plot(a,b,/histogram,/ylog,yrange=[1.0d-3,10])
Then tell me what happened to the last data point. I understand that 0
is an illegal log value, but IDL should be smart enough to filter
this. BTW, this works fine in direct graphics.
Haje
|
|
|
Re: Log histogram = FAIL [message #72042 is a reply to message #71962] |
Tue, 03 August 2010 12:24  |
Haje Korth
Messages: 651 Registered: May 1997
|
Senior Member |
|
|
Chris,
just to confirm to the forum, that it is the histogram keyword that
causes the unwanted results. I still had this in memory from the tech
preview, but since it is not documented I cannot complain here. :-)
I will test the barplot routine instead. Hopefully one can turn off
the sides of the bars so my distributions do not look like cities with
sky scrapers.
Haje
On Aug 3, 2:17 pm, Chris Torrence <gorth...@gmail.com> wrote:
> On Aug 2, 12:17 pm, Haje Korth <hajeko...@gmail.com> wrote:
>
>> Plotting log histograms using new graphics system in IDL does not work
>> right. Try
>
>> IDL> a=findgen(10)+1
>> IDL> b=10./a^2
>> IDL> b[8]=0
>> IDL> p=plot(a,b,/histogram,/ylog,yrange=[1.0d-3,10])
>
>> Then tell me what happened to the last data point. I understand that 0
>> is an illegal log value, but IDL should be smart enough to filter
>> this. BTW, this works fine in direct graphics.
>
>> Haje
>
> Hi Haje,
>
> The log plot seems to work correctly without the histogram keyword:
>
> p=plot(a,b,'-o',/ylog,yrange=[1.0d-3,10])
>
> We didn't document the histogram keyword, because we wanted people to
> start using barplot() instead. Unfortunately, for IDL 8.0, BARPLOT
> doesn't handle logarithmic axes. However, I have just fixed the
> barplot code, and it will be available in the next IDL update.
>
> Cheers,
> Chris Torrence
> IDL Software Development Manager
> ITTVIS
|
|
|
Re: Log histogram = FAIL [message #72048 is a reply to message #71962] |
Tue, 03 August 2010 11:17  |
chris_torrence@NOSPAM
Messages: 528 Registered: March 2007
|
Senior Member |
|
|
On Aug 2, 12:17 pm, Haje Korth <hajeko...@gmail.com> wrote:
> Plotting log histograms using new graphics system in IDL does not work
> right. Try
>
> IDL> a=findgen(10)+1
> IDL> b=10./a^2
> IDL> b[8]=0
> IDL> p=plot(a,b,/histogram,/ylog,yrange=[1.0d-3,10])
>
> Then tell me what happened to the last data point. I understand that 0
> is an illegal log value, but IDL should be smart enough to filter
> this. BTW, this works fine in direct graphics.
>
> Haje
Hi Haje,
The log plot seems to work correctly without the histogram keyword:
p=plot(a,b,'-o',/ylog,yrange=[1.0d-3,10])
We didn't document the histogram keyword, because we wanted people to
start using barplot() instead. Unfortunately, for IDL 8.0, BARPLOT
doesn't handle logarithmic axes. However, I have just fixed the
barplot code, and it will be available in the next IDL update.
Cheers,
Chris Torrence
IDL Software Development Manager
ITTVIS
|
|
|