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

Home » Public Forums » archive » Re: Histogram with logarithmic filling
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
Re: Histogram with logarithmic filling [message #48843] Wed, 31 May 2006 10:15
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> I've only investigated
> the case where YLOG=1, but you have to change a number of
> yfill values to 1 (instead of 0)

Now that I look closely at my code, I did change this line:

Yfill = [0, Yfill, 0]

To this line:

Yfill = [1, Yfill, 1]

But there were 3 or 4 other places where I have to find "[0,yhist,0]"
and change it to "[1,yhist,1]".

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Histogram with logarithmic filling [message #48844 is a reply to message #48843] Wed, 31 May 2006 10:11 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Jo Klein writes:

> Hm why not? Have you tried setting the /ylog keyword to plothist? What
> happens then?

Well, it is a *little* more complicated than that because
the author of PLOTHIST never anticipated someone might actually
set the PLOT YLOG or XLOG keywords. I've only investigated
the case where YLOG=1, but you have to change a number of
yfill values to 1 (instead of 0), and you have to remember
that !Y.CRANGE contains the exponents of the range values,
not the values themselves when you are in a LOG plot. So you
need something like this:

Yfill = Yfill > 10^(!Y.CRANGE[0]) < 10^(!Y.CRANGE[1])

In place of this:

Yfill = Yfill > !Y.CRANGE[0] < !Y.CRANGE[1]

But about 10 minutes work should set you right for log plots. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Histogram with logarithmic filling [message #48845 is a reply to message #48844] Wed, 31 May 2006 09:36 Go to previous message
Jo Klein is currently offline  Jo Klein
Messages: 54
Registered: January 2006
Member
Hm why not? Have you tried setting the /ylog keyword to plothist? What
happens then?
Jo

Boto wrote:
> Hi~
>
> It is easy to fill histogram in linear plot, but I can't do that on
> logarithmic plot.
> How can I do this?
> I know plothist.pro of astron package. However it is not possible to do
> that in log scale.
>
> Help me please~~
>
> Good Day~
>
> Boto
>
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Mac OSX and IDL6.3
Next Topic: Re: desallocate an array of double passed by a library

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

Current Time: Sat Oct 11 10:07:33 PDT 2025

Total time taken to generate the page: 1.27970 seconds