Palette number of entries not showing in Jupyter Notebook

I am trying to plot some 2D histogram with COLZ option in Jupyter notebook reading a root file with TChain
Everything works fine, but the final plot, do not show the number of entries in the palette.

``chain = ROOT.TChain(tree)
chain.Add(file.root’)

c2 = ROOT.TCanvas(“c2”, “c2”)
c2.cd()

h2 = ROOT.TH2D(“h2”, “h2”, 20, 0, 20, 20, 0, 20)
chain.Draw(“var1:var2>>h2”)
h2.Sumw2()

h2.Draw(“COLZ”)
c2.Draw()``

_ROOT Version: 6
_Platform: Jupyter Notebook
Compiler: Not Provided


What do you mean ? can you send a screen dump ?

Screenshot from 2022-05-23 11-12-31

I mean the number of entries for each color in the palette. Sorry, I was not clear.

Ah ok. The axis labels.
Try to enlarge the right main of the canvas.

c2 = ROOT.TCanvas("c2", "c2", 700, 500)

Changing “700” to higher values, does not change anything, just the size of the canvas.
But, I am not sure, you mean this.

 c->SetRightMargin(...);

Oh, it works, thank you a lot. I didn’t find an answer to this anywhere.
Have a good day. :slight_smile:

https://root.cern/doc/master/movepalette_8C.html

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