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

Home » Public Forums » archive » Log histogram = FAIL
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
Log histogram = FAIL [message #71962] Mon, 02 August 2010 11:17 Go to next message
Haje Korth is currently offline  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 Go to previous message
Haje Korth is currently offline  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 Go to previous message
chris_torrence@NOSPAM is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: oplot and oploterror, later fails to work
Next Topic: Re: yet another 2d matching question

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

Current Time: Fri Oct 10 10:33:10 PDT 2025

Total time taken to generate the page: 1.99902 seconds