Draw TGraph with horizontal error band

Hello,

I have a TGraphAsymmErrors and the graph has horizontal error bars. I want to draw the errors with an error band but as far as I know the TGraphPainter is providing only the draw options “3” and “4” which are only for vertical error bars.

Is there another way to draw an error band for horizontal error bars? (without exchanging the axes)

Best Regards,
Marina

TGraphPainter

Hi @Wile_E_Coyote,

Thanks! The thing is that the options of TGraphPainter are just for vertical error bars. Am I missing something?

Cheers,
Marina

Hi,

Sorry to bug again but I still haven’t found a way to do it. Is there a way to create the error band with horizontal error bars or should I abandon it?

Best Regards,
Marina

Hi. Do you want to get something like this?
If so, there is a PyROOT code therein but I guess it can be adapted in c++.

BTW, I think it could be interesting to have a native draw option to get such error band “automatically”.

Hi,

Thank you very much! I am using PyROOT so that works for me and it works for horizontal error bars too!

Yeah, It would be really great to have such an option!

Yes may be you can open a Jira ticket with this request so we do not lost this idea ?

1 Like

ROOT-9553 has been created.

1 Like

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