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

Home » Public Forums » archive » Re: histogram along y-axis
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 along y-axis [message #51803] Fri, 08 December 2006 06:46
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
JH writes:

> But I'd like to plot a histogram with rectangle shape as the "plothist"
> does.

Add PSYM=10 to the PLOT command.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: histogram along y-axis [message #51804 is a reply to message #51803] Fri, 08 December 2006 06:24 Go to previous message
JH is currently offline  JH
Messages: 2
Registered: December 2006
Junior Member
Thank you for your answer.

But I'd like to plot a histogram with rectangle shape as the "plothist"
does.

PSYM=10 doesn't work.

JH

David Fanning 작성:

> JH writes:
>
>> Normal histogram plot along x-axis but I'd like to plot a histogram
>> along y-axis.
>>
>> How can I do that?
>
> Uh, well, like this:
>
> h = histogram(dist(256),omin=minval, omax=maxval)
> plot, h, scale_vector(findgen(n_elements(h)), minval, maxval)
>
> You can find SCALE_VECTOR here, or you can produce
> your own dependent vector in whatever way you like:
>
> http://www.dfanning.com/programs/scale_vector.pro
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: histogram along y-axis [message #51806 is a reply to message #51804] Fri, 08 December 2006 05:23 Go to previous message
Braedley is currently offline  Braedley
Messages: 57
Registered: September 2006
Member
Or you could use bar_plot with /rotate. There might be some other
keywords that would need to be set, and it's not as painless as the
regular plot with psym=10, but it'll work

Braedley

JH wrote:
> Normal histogram plot along x-axis but I'd like to plot a histogram
> along y-axis.
>
> How can I do that?
>
> Thank you.
Re: histogram along y-axis [message #51809 is a reply to message #51806] Fri, 08 December 2006 05:12 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
JH writes:

> Normal histogram plot along x-axis but I'd like to plot a histogram
> along y-axis.
>
> How can I do that?

Uh, well, like this:

h = histogram(dist(256),omin=minval, omax=maxval)
plot, h, scale_vector(findgen(n_elements(h)), minval, maxval)

You can find SCALE_VECTOR here, or you can produce
your own dependent vector in whatever way you like:

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

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: How to test for a vector/matrix of constants?
Next Topic: 2006 IDL Christmas Card

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

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

Total time taken to generate the page: 0.73697 seconds