Hello,
I am plotting a TH3D histogram (using drawing option: “glcolz”) on a canvas, and then try to draw a TGraph2D graph on the same canvas, but I cannot. Any one can give me a hint why the 2nd graph cannot be drawn on the same canvas? Any solution?
[quote=“zhiyiliu”]Hello,
I am plotting a TH3D histogram (using drawing option: “glcolz”) on a canvas, and then try to draw a TGraph2D graph on the same canvas, but I cannot. Any one can give me a hint why the 2nd graph cannot be drawn on the same canvas? Any solution?
The test files are attached.
Cheers,
Zhiyi.[/quote]
Hello. “same” option is not implemented for gl at the moment.
I wrote a ‘dirty’ code doing some tricks to realize this task. The working code is attached.
As I saw from previous posts, ‘gl’ option was really slow. Now it is still slow, I assume no improvements on working out a real ‘gl’ yet?
Cheers,
Zhiyi.[/quote]
What is ‘real ‘gl’’? You have 287432 bins, each bin is painted as a box (for each box only top, bottom and two front-side polygons are drawn). So it’s slow to draw 287432 * 4 quads on your machine with color and transparency (alpha-blending).
But I’ll check what can be improved.
Thanks for this. If boxes are totally transparent, we may not need to plot all those boxes and may significantly improve speed in some case.
[quote]So it’s slow to draw 287432 * 4 quads on your machine with color and transparency (alpha-blending).
But I’ll check what can be improved.[/quote]
[quote=“zhiyiliu”]Thanks for this. If boxes are totally transparent, we may not need to plot all those boxes and may significantly improve speed in some case.
[/quote]
Yes, that’s right, I can skip boxes, which are less than, say, 1% opaque.