Scatter plot from TChain give multiple superimposed TGraph

Hi rooters,

I have a TChain made of several root file which contain TTree.
I plot a scatter plot using the Draw method but I am obtaining a strange behavior:
if I try to change the color of the graph, only some points (markers) actually change their color.
I tried both to inspect and delete the graphs drawn on the canvas and it came out that
on the canvas there were 6 graphs with the following number of events: 5 of them have 1000000 events while the last one has 220210 events. Notice that the number returned by the TChain::Draw method is 4220210.

Do you have any ideas of what could be the issue?
Is it possible that the TGraph object has a maximum number of points that can “contain”?
How can I fix it?

ROOT Version: 6.08.06
Platform: Debian 3.16.43-2+deb8u5 (2017-09-19) x86_64 GNU/Linux
Compiler: gcc version 4.9.2

Can you provide some reproducer ? the commands you actually perform ?

The command is really only


but I’ve just tried to do the same scatter plot with the same command but with more strict selection to reduce the number of events surviving and the TCanvas now has only two objects:

  • the htemp with the axis, the title and zero entries
  • the graph with a number of points equal to the number returned by the TChain::Draw method

Everything seems to point to the idea of a too huge number of events to be plotted…

Yes with a huge number of point the rendering is done with several polymarker sets

Ah ok thanks!
Btw, is there a clever way to change the marker color in such situations?

I guess you can set the color to the chain itself.

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