Making 3-D Spherical plot

This image is TH2F plot in THist tutorial.

My question, I want to make 3D Spherical plot for this image.
I want to make It just seem like globe, In this case, spherical model made by flat image.

This image made by TH2F code and used COLZPOL draw function.
this is my code

   TCanvas *c1 = new TCanvas("c1","c1",600,400);
   TH2F *hcol1 = new TH2F("hcol1","Option COLor combined with POL",40,-4,4,40,-4,4);
   Float_t px, py;
   for (Int_t i = 0; i < 25000; i++) {
   return c1;

I has changing function “COLZPOL” to “glSurf1pol”. but made plot was weird.
There are no center, no coordinate, no standard.
If i make 3D plot for this code, how can change the code.

best regard,

Try the option SPH

Hi. couet

actually, I’m already try it ‘SPH’. But it doesn’t work.

best regard,

the option would be:

   hcol1->Draw("SPH surf5");

but I agree it does not work very well in that case. I am afraid there is nothing to do what you are looking for.

Dear couet

Thanks for your reply.
Option “SPH surf5” is the best result I have ever had.

But, as you can see, image have some cutting section.
If I fix it, my work is done maybe :slight_smile:

Thank you couet

best regard,

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