Log scale for "negative axis"?

Dear Rooters,

I have a very dumb question - I have a graph with the data and a few theoretical models on it with all negative y values. I like to make it a log scale on Y. Does anyone have clever tricks to do this? I thought of doing the log computation by hand, but then one has also fix the error bars, axis lables and so on, which is quite painful … I couldn’t find much from the TPad::SetLogy() code; if someone could point me to the right place in the ROOT source code where the Log calculation is made, I could probably implement a simple"inversion" algorithm myself to do this.

Thank you for any help you could offer!

Best regards,
Jianglai

Of course Log of negative values is not defined. So if your Y scale is entirely negative ROOT will complain (which is normal). I would suggest you create a new graph (from the one you have) shifted along Y axis in order to have all Y values positive.