21void graphpalettecolor()
27 double x[5] = {1, 2, 3, 4, 5};
28 double y1[5] = {1.0, 2.0, 1.0, 2.5, 3.0};
29 double y2[5] = {1.1, 2.1, 1.1, 2.6, 3.1};
30 double y3[5] = {1.2, 2.2, 1.2, 2.7, 3.2};
31 double y4[5] = {1.3, 2.3, 1.3, 2.8, 3.3};
32 double y5[5] = {1.4, 2.4, 1.4, 2.9, 3.4};
35 g1->
SetTitle(
"Graph with a red star");
37 g2->
SetTitle(
"Graph with a circular marker");
39 g3->
SetTitle(
"Graph with an open square marker");
41 g4->
SetTitle(
"Graph with a blue star");
43 g5->
SetTitle(
"Graph with a full square marker");
56 g1->
Draw(
"CA* PLC PFC");
57 g2->
Draw(
"PC PLC PFC");
58 g3->
Draw(
"PC PLC PFC");
59 g4->
Draw(
"*C PLC PFC");
60 g5->
Draw(
"PC PLC PFC");
Option_t Option_t TPoint TPoint const char y2
Option_t Option_t TPoint TPoint const char y1
R__EXTERN TStyle * gStyle
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
A TGraph is an object made of two arrays X and Y with npoints each.
void Draw(Option_t *chopt="") override
Draw this graph with its current attributes.
void SetTitle(const char *title="") override
Change (i.e.
void SetOptTitle(Int_t tit=1)
void SetPalette(Int_t ncolors=kBird, Int_t *colors=nullptr, Float_t alpha=1.)
See TColor::SetPalette.