Hi,
In this new version I was trying to plot a graph with a Y-axis in log-scale. But that is returning error messages with blank canvas. But this is working fine with older versions like v6.20. The message I’m getting is
Processing Test.C...
Error in <THistPainter::PaintInit>: log scale requested with a negative argument (-0.050000)
Error in <THistPainter::PaintInit>: log scale requested with a negative argument (-0.050000)
Info in <TCanvas::Print>: pdf file Test.pdf has been created
Any idea how to resolve this issue will be appreciated. I have attached herewith a sample macro and sample data file. Test.C (889 Bytes) Test.txt (591 Bytes)
after drawing, you will see that the minimum (y value) in your case is -0.05, even though you don’t have negatives in your data.
You can set a minimum greater than zero by hand, after drawing but before setting the log scale. Just make sure it’s smaller than your lowest data point; for your case, e.g.
Thanks a lot @dastudillo, that solves the issue.
But that made me wonder what if I have indeed negative values of the variable on the Y-axis. Wouldn’t it be possible to plot in log-scale? I suppose this is happening because a bin-content cannot be negative, right?