Draw TGraph2D, very slow

Hi,
I have 21K points needing to be drawn using TGraph2D. According to my understanding, the object of TGraph2D needs to be triangulated first. Since 21K in total, the process is extremely slow. My question is: do all drawing options need the triangulation first to draw? For example, I use “cont4”, this drawing option needs triangulation? If not, can we skip it and speed things up?

Thanks,
Zhiyi.

only if you draw the points as markers the triangulation will not be needed.
CONT4 will plot the histogram filled from the triangulation… so yes it needs it.
The question you should ask yourself is: do you really need a TGraph2D ? May be a TH2D is enough ?

[quote=“couet”]only if you draw the points as markers the triangulation will not be needed.
CONT4 will plot the histogram filled from the triangulation… so yes it needs it.
The question you should ask yourself is: do you really need a TGraph2D ? May be a TH2D is enough ?[/quote]
Good question. If using TH2D, since all points are located not equally in x and y, I have to grid them first (using a 3rd-party tool) and import to a TH2D object.

they can be non equidistant but on a grid. In that case TH@ with non equidistant bin is what you need.