Check duplicate issues.
Description
Issue based on the following ROOT forum post by user dastudillo. I copy the content here, for the issue to be self-contained:
I found a problem with TTree::Draw() in the latest root, when plotting 3 variables and using the “box” and “lego” options (from the docs, “lego” is not valid, but it does work --translated as “box” apparently; in any case, both show the same problem I describe here).
I’m not sure if it has to do with one axis being non-numeric, but in this case the x-axis is like that, and some of those bins (all the y-z bins of more than one x-axis bin) are not shown in the plot, and the z-axis goes beyond the cut I set, see below. In the previous ROOT version (6.36.12) this does not happen (I didn’t test others). What’s more, the issue seems to show up, at least in my tests, only when more than some number of entries is plotted.
Reproducer
test.root.zip
As an example, attached above is the root file used for the plots below, and to get each pair of plots (left / right), do
$ root test.root
[] auto c = new TCanvas(); c->SetCanvasSize(600,1000); c->SetWindowSize(610,1030); c->Divide(1,2);
[] c->cd(1); T1->Draw("z:y:cat","z<10","box2");
[] c->cd(2); T2->Draw("z:y:cat","z<10","box2");
note that T1 contains 1000 entries and T2 contains 2000 (the first 1000 are the same as in T1).
The resulting plots are (joined afterwards):

The 2 plots on the left are with the previous ROOT version. For both versions, the upper plots are from T1, which has 1000 entries, and the lower plots are with T2, i.e. 2000 entries. The issue is the lower-right plot (v6.40.00, 2000 entries): the entries in catC and catD are not shown, and z goes to 12, instead of staying below 10; it starts at some point between 1000 and 2000 entries.
ROOT version
6.40.00
Installation method
unknown
Operating system
Ubuntu 24.04 (Linux Mint 22.3)
Additional context
No response
Check duplicate issues.
Description
Issue based on the following ROOT forum post by user
dastudillo. I copy the content here, for the issue to be self-contained:I found a problem with TTree::Draw() in the latest root, when plotting 3 variables and using the “box” and “lego” options (from the docs, “lego” is not valid, but it does work --translated as “box” apparently; in any case, both show the same problem I describe here).
I’m not sure if it has to do with one axis being non-numeric, but in this case the x-axis is like that, and some of those bins (all the y-z bins of more than one x-axis bin) are not shown in the plot, and the z-axis goes beyond the cut I set, see below. In the previous ROOT version (6.36.12) this does not happen (I didn’t test others). What’s more, the issue seems to show up, at least in my tests, only when more than some number of entries is plotted.
Reproducer
test.root.zip
As an example, attached above is the root file used for the plots below, and to get each pair of plots (left / right), do
note that T1 contains 1000 entries and T2 contains 2000 (the first 1000 are the same as in T1).

The resulting plots are (joined afterwards):
The 2 plots on the left are with the previous ROOT version. For both versions, the upper plots are from T1, which has 1000 entries, and the lower plots are with T2, i.e. 2000 entries. The issue is the lower-right plot (v6.40.00, 2000 entries): the entries in catC and catD are not shown, and z goes to 12, instead of staying below 10; it starts at some point between 1000 and 2000 entries.
ROOT version
6.40.00
Installation method
unknown
Operating system
Ubuntu 24.04 (Linux Mint 22.3)
Additional context
No response