f

#### Histogram problem #2

```Hello all,

I have two histograms, I want to overplot both, but y-axis scaling of these two
histograms are very different such that when I am overploting them the feature of one is completely getting suppressed. So someone advised me plot normalized histograms, can any one suggest me how to do that in IDL??
```
 0
priyamalik484
12/14/2016 4:10:58 AM
comp.lang.idl-pvwave 12260 articles. 4 followers.

1 Replies
643 Views

Similar Articles

[PageSpeed] 55

```On 12/14/2016 05:10 AM, priyamalik484@gmail.com wrote:
> I have two histograms, I want to overplot both, but y-axis scaling of
> these two histograms are very different such that when I am
> overploting them the feature of one is completely getting suppressed.
> So someone advised me plot normalized histograms, can any one suggest
> me how to do that in IDL??
Hi,

h1=histogram(...)
h2=histogram(...)

hn1=h1/total(h1)
hn2=h2/total(h2)
b1=barplot(hn1,index=0,nbars=2)
b2=barplot(hn2,index=1,nbars=2,fill_color='b',overplot=b1)

for more details on formating, see
http://www.harrisgeospatial.com/docs/barplot.html

or alternatively if you don't need the normalization and just want to
fit both histograms with appropriate scales into the same graphics

b3=barplot(h1,index=0,nbars=2,yrange=[0,max(h1)*1.1])
b4=barplot(h2,index=1,nbars=2,yrange=[0,max(h2)*1.1], \$
overplot=b3,fill_color='b')
a2=axis('y',target=b4,location=right,textpos=1,color='b',showtext=1)

for details on additional axes, see
http://www.harrisgeospatial.com/docs/AXIS.html

Both versions are not tested, but should at least give you an idea how
to proceed.

Good luck,       Markus
```
 0
Markus
12/15/2016 2:16:47 PM