How to set the DrawOption for y Projection using the SetShowProjectionY for a TH2D Histogram

I’m using TBrowser to show a TH2D histogram in a root file. I need to make multiple projections to the y-Axis. These Projections always use the “HISTO” draw option but I need to show the error bars. Tabbing into the projection and manually setting the DrawOption for each slice is very tiresome. Setting the “Draw Option” in the TBrowser GUI shows the TH2D in error bar style which breaks the projection. My two questions are:

  1. How do I set the default draw option for projections of a TH2D?
  2. How do I do these projections in my code to be saved to a root file?

Please read tips for efficient and successful posting and posting code

ROOT Version: ROOT 6.36.02
Platform: Linux
Compiler: gcc


Hi @DavidK,

Maybe @linev can help you here.

Cheers,

Dev

May be you can use a script instead of using the browser. It might be easier as it seems you are doing some repetitive operations.