14 const Int_t paletteSize = 10;
27 Int_t palette[paletteSize] = {0};
29 for (
Int_t i = 0; i < paletteSize; ++i)
35 TCanvas *cnv =
new TCanvas(
"glc",
"Surface sample", 200, 10, 600, 550);
38 "\"glsurf2pol\" option + user defined palette.");
42 TPad *rosePad =
new TPad(
"box",
"box", 0.04, 0.04, 0.96, 0.8);
46 TF2 *fun =
new TF2(
"a",
"cos(y)*sin(x)+cos(x)*sin(y)", -6, 6, -6, 6);
51 fun->
Draw(
"glsurf2pol");
R__EXTERN TStyle * gStyle
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb",...
virtual void SetNpx(Int_t npx=100)
Set the number of points used to draw the function.
A 2-Dim function with parameters.
virtual void SetContour(Int_t nlevels=20, const Double_t *levels=nullptr)
Set the number and values of contour levels.
virtual void SetNpy(Int_t npy=100)
Set the number of points used to draw the function.
void Draw(Option_t *option="") override
Draw this function with its current attributes.
The most important graphics class in the ROOT system.
TVirtualPad * cd(Int_t subpadnumber=0) override
Set Current pad.
void Draw(Option_t *option="") override
Draw Pad in Current pad (re-parent pad if necessary).
A Pave (see TPave) with a text centered in the Pave.
void Draw(Option_t *option="") override
Draw this pavelabel with its current attributes.
void SetPalette(Int_t ncolors=kBird, Int_t *colors=nullptr, Float_t alpha=1.)
See TColor::SetPalette.
void SetCanvasPreferGL(Bool_t prefer=kTRUE)