Axis in the middle of canvas

Hi ROOTers,

From the example: https://root.cern.ch/doc/master/pict1_TGaxis_004.png

given in https://root.cern.ch/doc/master/classTGaxis.html

I’m wondering if there is a way to draw the same plot, but have the y axis drawn at x = 0 instead, i.e. in the middle of the canvas. Of course in this case I want also that the canvas has no frame, but that could be faked by setting the border to be white, or that it has zero horizontal margin. Only the axis positioning is not obvious to me.

It’s for an illustrative plot to be used in a talk, and for this the regular style doesn’t look very nice.

p/s: the question also extends to wanting the x-axis positioned arbitrarily within the canvas

Cheers,
Afiq

how about this:

Otto

Perfect. Thanks a lot!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.