{ gROOT->Reset(); gStyle->SetPalette(1); TH2F* h = new TH2F("h2","hist title",20,-4,4, 20, -5, 5); TF2* f = new TF2("f2","xgaus(0)*ygaus(3) + xgaus(6)*ygaus(9) + xgaus(12)*ygaus(15)"); Double_t p[18] = { 1.5, 3, 0.5, 1.5, 3, 1, 2, 1, 2, 1.5, 0, 1.5, 1.5, -2, 0.1, 1.5, -2, 0.8 }; f->SetParameters(p); h->FillRandom("f2",2000000); h->SetFillColor(kRed); // h->SetMarkerStyle(29); // Set all the canvas styles: TString styles[]{"BOX","COLZ","CONT1","ARR","SCAT","SURF3"}; int n{6}; TCanvas c1("c1","draw styles", 0, 0, 1000,800); c1.Divide( 3, 2 ); // Divide the canvas us int i{1}; // Clone each histogram and draw with a different style: for ( auto style : styles) { TH2F* hi = (TH2F*) h->Clone(); hi->SetTitle(Form("Draw(\"%s\")", (const char*) style)); c1.cd(i++); hi->Draw(style); } c1.cd(); c1.SaveAs("histDraws2.png"); }