#include "TStyle.h" #include "TList.h" #include "TH3.h" #include "TF1.h" Double_t transfer_function(Double_t *x, Double_t * /*param*/) { //This function is required to suppress //boxes for empty bins - make them transparent. if (x) return *x > 0 ? 1. : 0.; return 0.; } void Oven_Homogeneity() { const unsigned nBins = 30; TH3F * const histo = new TH3F("histo","Oven Homgeneity", nBins, 0.,122., nBins, 0., 122., nBins, 0., 122.); TList * const lof = histo->GetListOfFunctions(); if (!lof) { std::cout<<"List of functions is null\n"; delete histo; return; } lof->Add(new TF1("TransferFunction", transfer_function, 0., 1000., 0)); gStyle->SetCanvasPreferGL(kTRUE); gStyle->SetPalette(1); histo->Fill(100., 95., 108., 94.46); histo->Fill(100., 95., 89., 94.19); histo->Fill(100., 95., 69., 93.12); histo->Fill(100., 95., 48., 91.9); histo->Fill(100., 95., 28., 87.6); histo->Draw("glcolz"); }