Zero line of Graphs


I’d like to know if it’s possible to remove the line that appear at zero in the Y-Axis in a TGraph object. I’ve been looking in TFrame, TBox, TGraph, TStyle, etc. but I haven’t found anything yet. In other way, when you draw a function like in the example of the getting started chapter of the user’s guide, this line doesn’t appear.

I’ve trying to look the code of the Draw methods of TF1 and TGraph but are very similar.

Anyone can help me?



Thank you!

A little tricky to paint a graph without thisline, :smiley: . I think would be better to put a flag to do that.


I know that you can put axis titles with the graphical interface, but how can I do that in my macro?

Since I’ve painted a frame I can’t get the axis to Set its title. Axis are painted with the frame.

h = (TH1F*)gPad->FindObject("hframe"); // axis from frame histo (not grpah) h->GetXaxis()->SetTitle("x title");Jan

Note that when you have modified a Canvas interactively, you can save it as a macro (.C file). Then you can look at this file and see how your changes are done inside a macro. It is a good way to learn how to change graphics attributes within a macro.