Switch x- and y-axis


is there any easy way to switch the x and y axis of a 2D histogram so that a TF1-function uses the former y axis as x?

Sorry I’m not answering your question vaubee, I’m also interested if there is a good way to do this.

I would also be interested to know how to change a TF1(“f”, “x”) to a TF2(“f”,“y”)? If such a thing were possible.

There not a such method implemented yet. To do that you should make a new histogram with inverted axis and fill it with the inverted values of the original one. something like

For all bins in horig do {

Is there any update to this topic?

Thanks, Tomas.

No, the way to do it is described above.