Re: histogram along y-axis [message #51803] |
Fri, 08 December 2006 06:46 |
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  |
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  |
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  |
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.")
|
|
|