Possibly unintended behavior of TGraphPainter

Hello,

I have either a bug report or a feature request depending on weather the following behavior is intended or not:

Until now I understood the “A” draw option of TGraph objects to be similar to the “AXIS” draw option of TH1 objects, but there is an important difference: The “AXIS” draw option of histograms can be used to draw just the axes and no data whilst the “A” draw option of graphs only draws the axes as long as there is at least one draw option for the graphs data. This is because of of line 1249 of TGraphPainter.cxx.

This leads to there being no “clean” way to draw just the graphs axes but not its data (Of course you can set the draw option “3” and the fill style to 0 which is a dirty workaround.).

In case this is not the intended behavior to draw graphs, I propose to add the “optionAxis” to this line 1249 of TGraphPainter.cxx as a bug report.

In case this behavior is intended, I propose to add a draw option for graphs which similar as the “AXIS” option of histograms draws just the axes and no data as a feature request.


ROOT Version: 6.15/01
Platform: Independent
Compiler: Independent


// if (gPad) gPad->Clear(); delete some_graph->GetHistogram(); some_graph->SetHistogram(0); // "clear" it
some_graph->GetHistogram()->Draw("AXIS");

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