TRootBrowser and default draw option

Hello everybody,

I use the TRootBrowser to browse through my analysis results. They consist mostly of graphs and histograms. And I find it quite tedious to set the draw option to “AP” (which is not in the list) for graphs and then revert it to “” for histograms.

I would like to propose to add a “default” draw option to the GUI list. If this option is selected a setting from .rootrc file or a hard coded default would be used. Something like this:

  • add the following lines to TGFileBrowser::CreateBrowser
   fDrawOption->AddEntry("default", dropt++);
  • modify TGraph::Browse to
   TString opt;
   if (b) opt = b->GetDrawOption();
   if (!b || !opt.CompareTo("default"))
	   opt = gEnv->GetValue("TGraph.BrowseOption", "alp");
  • modify TH1::Browse as for TGraph

  • add lines to ~/.rootrc according to your taste

TGraph.BrowseOption			AP

What do you think?

Cheers, Kašpi.

Hi Kašpi,

We’ll see what we can do about this… Thanks for the suggestion! :slight_smile:

Cheers, Bertrand.