Draw "same" from TBrowser

Hello,
Is it possible to draw two plots on the same canvas
(i.e., h->Draw(“same”)) from the TBrowser window?

…as in, draw the first histo by double clicking on its name,
a canvas is automatically created, and then select a menu
option for the second histogram that automatically draws it
on the same canvas with the “same” option?

I tried “SetDrawOption” putting “same” in but it didn’t work.

Thanks,
-Phil D.

Hi,

Just select “same” in the top right “Option” combo box…

Cheers,
Bertrand.

Fantastic! I’d never seen that before.
Too bad there’s not also a "sames"
Is it also reasonably simple to add a Legend, and draw the
Stats box of the second histo as well? Again I’m not seeing
any obvious candidates, but apparently I’m blind…
-P

[quote=“bellenot”]Hi,

Just select “same” in the top right “Option” combo box…

Cheers,
Bertrand.[/quote]

Hi Phil,

[quote]Is it also reasonably simple to add a Legend, and draw the
Stats box of the second histo as well? Again I’m not seeing
any obvious candidates, but apparently I’m blind… [/quote]
What do you mean? The options available from the browser are the ones in this combo box…
If you need to make more operations on your histos, open the editor from the canvas (menu “view” -> “Editor”), or write a macro…

Cheers, Bertrand.

Hi, again,

What I mean is, yes, I’ve written plenty of ROOT macros, to the point where I started dreaming of writing…the TBrowser! Thankfully it already exists, and it has much but unfortunately not all of the functionality that I was thinking of, unless I’m mistaken - hence this thread on Root Talk. So for instance if I want to plot two histos on the same canvas, well the option box is there. But then the next obvious thing is to want to draw a Legend which I can edit. Well there is a draw PaveText tool, but not a legend specifically - you see, it’s almost there, but not quite, unless there’s something I’m missing.

Same thing with a “sames” option - just slot it in right under the “same” option and double the power! :smiley: if I may be so bold as to suggest…

Thanks,
-Phil D.

[quote=“bellenot”]Hi Phil,

[quote]Is it also reasonably simple to add a Legend, and draw the
Stats box of the second histo as well? Again I’m not seeing
any obvious candidates, but apparently I’m blind… [/quote]
What do you mean? The options available from the browser are the ones in this combo box…
If you need to make more operations on your histos, open the editor from the canvas (menu “view” -> “Editor”), or write a macro…

Cheers, Bertrand.[/quote]

TCanvas has the option “BuilLegend”. It automatically builds a legend using the names of the histograms.
Right-click somewhere outside your plot frame (white field on the edges) and this option should appear.