Problem when rescaling Y axis

With this code, “scaling” of the Y-axis works only for TH2 and TH3 histograms.
For a TH1 histogram, only the X-axis can be “scaled” this way (i.e. you cannot change the “contents” of the histogram).