How to space bin labels for "strings" objects?

Hi,

I’m trying to plot a distribution of a branch containing ROOT.std.vectors<ROOT.std.string>

when I use the command Draw

MyTTree->Draw("channels")

I get a plot like this one I post below, where all the labels from the “string” values are put at the left corner of the plot.

I’m using

Which parameter have I to set to have them properly placed?

Thank you very much!

Ric.


Try:

MyTTree->Draw("channels>>hh(6)")
to force 6 bins

Rene

Hi Rene,

thanks a lot, it worked :smiley:

Now I get this plot below.

Thanks again and have a nice evening,

Ric.


Hi,

Sorry for bothering you again with this, but it seems that the solution does not scale well :unamused:

Now I have 7 elements in my vector of my “channels” branch.

So, if I simply do:

MyTree->Draw("channels")

I get the first plot below, as the first plot I posted above in my first message (but with 7 channels, of course)

And If I try to use the same solution as above, with

MyTree->Draw("channels>>(7)")

I get the strange second plot below.

Have I to use other options, maybe?

Thanks a lot again for your help,

Ric.