void piechart()
{
Float_t vals[] = {.2,1.1,.6,.9,2.3};
Int_t nvals =
sizeof(vals)/
sizeof(vals[0]);
"Pie with offset and no colors",nvals,vals);
"Pie with radial labels",nvals,vals,
colors);
"Pie with tangential labels",nvals,vals,
colors);
"Pie with verbose labels",nvals,vals,
colors);
}
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
TVirtualPad * cd(Int_t subpadnumber=0) override
Set current canvas & pad.
This class displays a legend box (TPaveText) containing several legend entries.
void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0) override
Automatic pad generation by division.
virtual void SetY2(Double_t y2)
Set the Y2 value.
virtual void SetY1(Double_t y1)
Set the Y1 value.
void SetValue(Double_t)
Set the value for this slice.
TPieSlice * GetSlice(Int_t i)
Return the reference to the slice of index 'id'.
void SetAngularOffset(Double_t)
Set the global angular offset for slices in degree [0,360].
void SetEntryFillStyle(Int_t, Int_t)
Set the fill style for the "i" slice.
void SetY(Double_t)
Set Y value.
void SetLabelsOffset(Float_t)
Set the distance between the label end the external line of the TPie.
virtual void Draw(Option_t *option="l")
Draw the pie chart.
void SetEntryRadiusOffset(Int_t, Double_t)
Set the distance, in the direction of the radius of the slice.
void SetLabelFormat(const char *)
This method is used to customize the label format.
void SetEntryLineStyle(Int_t, Int_t)
Set the style for the slice's outline. "i" is the slice number.
void SetEntryLineWidth(Int_t, Int_t)
Set the width of the slice's outline. "i" is the slice number.
void SetCircle(Double_t x=.5, Double_t y=.5, Double_t rad=.4)
Set the coordinates of the circle that describe the pie:
void SetRadius(Double_t)
Set the pie chart's radius' value.
TLegend * MakeLegend(Double_t x1=.65, Double_t y1=.65, Double_t x2=.95, Double_t y2=.95, const char *leg_header="")
This method create a legend that explains the contents of the slice for this pie-chart.
void SetEntryLineColor(Int_t, Int_t)
Set the color for the slice's outline. "i" is the slice number.