I have been using TGraph2Ds to visualize a set of points, but am seeing several problems when viewing
them with both the pcol and zcol options. I am using 5.28.00b.
Using the following snippet
Double_t dz[10] = {1.,2.,3.,4.,5.,6.,7.,8.,9.,10.};
Double_t x[10] = {1.,2.,3.,4.,5.,6.,7.,8.,9.,10.};
Double_t y[10] = {.4,.5,.1,.3,.8,.4,.5,.6,.2,.1};
TGraph2D hgdzval("hgdzval","dzval",10,x,y,dz);
hgdzval.Draw("zcolpcol");
I get the following image
c1a.pdf (15.2 KB)
Problem 1: the colors don’t show up on the Z color scale
Playing around I tried
hgdzval.Draw(“zcol”) and then after that another time with hgdzval.Draw(“zcolpcol”)
Now the z color scale shows the colors:
c1b.pdf (15.2 KB)
Problem 2: By default the z color scale is located off the edge of the pad. Perhaps it is possible to resize
parts of the pad so the color scale is all visible, but it would be very nice if the root defaults made that so.
I checked that I’m not changing any of the pad margins in my rootlogon, by the way.
Problem 3: Another issue is that it doesn’t seem to be possible to resize the histogram frame interactively,
with a TGraph2D - I can’t see where to “grab” onto it in the pad, you always get the icon to rotate the frame.
Lastly, I moved the z color scale to where I can see it, and now I want to rescale it. What I hoped would happen is that if I interactively zoom on the z color scale, that the colors would remap to the new limits
and that the color on the points would also rescale. This would be very useful behavior. But what happens looks buggy.
Problem 4: The z-axis on the frame changes correctly, and the numbers on the z color change, but the colors on the points don’t remap, and the colors on the z color scale are confused. See:c1c.pdf (15.1 KB)
Once this is fixed it would also be handy to adjust the color zoom by a script - how is that done with a TGraph2D?
The pcol option is potentially very useful - so thanks much for your help in addressing these issues.
Aaron