本文整理汇总了C++中TText::SetTextAlign方法的典型用法代码示例。如果您正苦于以下问题:C++ TText::SetTextAlign方法的具体用法?C++ TText::SetTextAlign怎么用?C++ TText::SetTextAlign使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TText
的用法示例。
在下文中一共展示了TText::SetTextAlign方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: highlight1
void highlight1()
{
TCanvas *ch = new TCanvas("ch", "ch", 0, 0, 700, 500);
const Int_t n = 500;
Double_t x[n], y[n];
TH1F *h[n];
for (Int_t i = 0; i < n; i++) {
h[i] = new TH1F(TString::Format("h_%02d", i), "", 100, -3.0, 3.0);
// in practice gaus need reset parameters
h[i]->FillRandom("gaus", 1000);
h[i]->Fit("gaus", "Q");
h[i]->SetMaximum(250); // for n > 200
x[i] = i;
y[i] = h[i]->GetFunction("gaus")->GetParameter(2);
}
TGraph *g = new TGraph(n, x, y);
g->SetMarkerStyle(6);
for (Int_t i = 0; i < n; i++) g->AddHighlight(i, h[i]);
g->Draw("AP");
g->SetHighlight();
TPad *ph = new TPad("ph", "ph", 0.3, 0.4, 1.0, 1.0);
ph->SetFillColor(kBlue - 10);
ph->Draw();
ph->cd();
TText *info = new TText(0.5, 0.5, "please move the mouse over the graph");
info->SetTextAlign(22);
info->Draw();
ch->cd();
TGraph::SetHighlightPad(ph);
}
示例2: overlayFrame
//--------------------------------------------------------------------------------------------------
void overlayFrame(TString text, bool align)
{
// Overlay a linear frame from user coordinates (0 - 1, 0 - 1) and put the frame text
// Create new transparent pad for the text
TPad *transPad = new TPad("transPad","Transparent Pad",0,0,1,1);
transPad->SetFillStyle(4000);
transPad->Draw();
transPad->cd();
// Overlay the text in a well defined frame
TText *plotText = new TText();
plotText->SetTextColor(kBlue);
plotText->SetTextSize(0.04);
plotText->SetNDC();
// Draw text at top right
if (align) {
plotText->SetTextColor(kBlack);
plotText->SetTextAlign(33);
plotText->DrawText(0.92,0.95,text.Data());
}
// Draw text at bottom left
else
plotText->DrawText(0.01,0.01,text.Data());
return;
}
示例3: greyscale
void greyscale()
{
TCanvas *c = new TCanvas("grey", "Grey Scale", 500, 500);
c->SetBorderMode(0);
Int_t n = 200; // tunable parameter
Float_t n1 = 1./n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
TBox *b = new TBox(n1*j, n1*(n-1-i), n1*(j+1), n1*(n-i));
Float_t grey = Float_t(i*n+j)/(n*n);
b->SetFillColor(TColor::GetColor(grey, grey, grey));
b->Draw();
}
}
TPad *p = new TPad("p","p",0.3, 0.3, 0.7,0.7);
const char *guibackground = gEnv->GetValue("Gui.BackgroundColor", "");
p->SetFillColor(TColor::GetColor(guibackground));
p->Draw();
p->cd();
TText *t = new TText(0.5, 0.5, "GUI Background Color");
t->SetTextAlign(22);
t->SetTextSize(.09);
t->Draw();
c->SetEditable(kFALSE);
}
示例4: PaintOverflow
void PaintOverflow(TH1 *h)
{
// This function paint the histogram h with an extra bin for overflows
char* name = h->GetName();
char* title = h->GetTitle();
Int_t nx = h->GetNbinsX()+1;
Double_t x1 = h->GetBinLowEdge(1);
Double_t bw = h->GetBinWidth(nx);
Double_t x2 = h->GetBinLowEdge(nx)+bw;
// Book a temporary histogram having ab extra bin for overflows
TH1F *htmp = new TH1F(name, title, nx, x1, x2);
// Fill the new hitogram including the extra bin for overflows
for (Int_t i=1; i<=nx; i++) {
htmp->Fill(htmp->GetBinCenter(i), h->GetBinContent(i));
}
// Fill the underflows
htmp->Fill(x1-1, h->GetBinContent(0));
// Restore the number of entries
htmp->SetEntries(h->GetEntries());
// Draw the temporary histogram
htmp->Draw();
TText *t = new TText(x2-bw/2,h->GetBinContent(nx),"Overflow");
t->SetTextAngle(90);
t->SetTextAlign(12);
t->SetTextSize(0.03);;
t->Draw();
}
示例5: table
void table(Float_t x1, Float_t x2, Float_t yrange, TText *t,
const char **symbol, Bool_t octal)
{
Int_t i;
Int_t n = 0;
for (i=0;i<1000;i++) {
if (!strcmp(symbol[i],"END")) break;
n++;
}
Float_t y1 = 2.5;
Float_t y2 = yrange - 0.5;
Float_t dx = (x2-x1)/5;
Float_t dy = (y2 - 1 -y1)/(n+1);
Float_t y = y2 - 1 - 0.7*dy;
Float_t xc0 = x1 + 0.5*dx;
Float_t xc1 = xc0 + dx;
Float_t xc2 = xc1 + dx;
Float_t xc3 = xc2 + dx;
Float_t xc4 = xc3 + dx;
TLine *line = new TLine();
line->DrawLine(x1,y1,x1,y2);
line->DrawLine(x1,y1,x2,y1);
line->DrawLine(x1,y2,x2,y2);
line->DrawLine(x2,y1,x2,y2);
line->DrawLine(x1,y2-1,x2,y2-1);
line->DrawLine(x1+ dx,y1,x1+ dx,y2);
line->DrawLine(x1+2*dx,y1,x1+2*dx,y2);
line->DrawLine(x1+3*dx,y1,x1+3*dx,y2);
line->DrawLine(x1+4*dx,y1,x1+4*dx,y2);
TText *tit = new TText(0,0,"a");
tit->SetTextSize(0.015);
tit->SetTextFont(72);
tit->SetTextAlign(22);
tit->DrawText(xc0,y2-0.6,"Input");
tit->DrawText(xc1,y2-0.6,"Roman");
tit->DrawText(xc2,y2-0.6,"Greek");
tit->DrawText(xc3,y2-0.6,"Special");
tit->DrawText(xc4,y2-0.6,"Zapf");
char text[12];
for (i=0;i<n;i++) {
if (octal) {
unsigned char value = *symbol[i];
sprintf(text,"@\\ %3o",value);
} else {
strcpy(text,symbol[i]);
}
t->DrawText(xc0,y,text);
sprintf(text,"%s",symbol[i]);
t->DrawText(xc1,y,text);
sprintf(text,"`%s",symbol[i]);
t->DrawText(xc2,y,text);
sprintf(text,"'%s",symbol[i]);
t->DrawText(xc3,y,text);
sprintf(text,"~%s",symbol[i]);
t->DrawText(xc4,y,text);
y -= dy;
}
}
示例6: SetupTowerDisplay
void SetupTowerDisplay(TH2F *hist)
{
hist->SetStats(kFALSE);
hist->SetXTitle("ieta");
hist->SetYTitle("iphi");
hist->GetXaxis()->CenterTitle();
hist->GetYaxis()->CenterTitle();
hist->GetXaxis()->SetNdivisions(65);
hist->GetXaxis()->SetLabelColor(0);
hist->GetXaxis()->SetTickLength(.78);
hist->GetXaxis()->SetTitleOffset(0.95);
hist->GetYaxis()->SetNdivisions(72);
hist->GetYaxis()->SetLabelColor(0);
hist->GetYaxis()->SetTitleOffset(0.85);
TText *yLabel = new TText();
TLine *pLine = new TLine();
pLine->SetLineStyle(1);
pLine->SetLineColor(1);
pLine->SetLineWidth(1);
yLabel->SetTextAlign(22);
yLabel->SetTextSize(0.015);
char phi_num[3];
char eta_num[3];
TText *xLabel = new TText();
xLabel->SetTextSize(0.015);
xLabel->SetTextAlign(22);
for (Int_t i=1; i<73; ++i)
{
sprintf(phi_num,"%d",i);
if(TMath::Abs(i%2)==1) {yLabel->DrawText(-33,0.5+i,phi_num);}
else {yLabel->DrawText(-34.5,0.5+i,phi_num);}
pLine->DrawLine(-32,i,33,i);
}
for (Int_t i=-32; i<33;++i)
{
sprintf(eta_num,"%d",i);
if(TMath::Abs(i%2)==0) {xLabel->DrawText(0.5+i,-0.5,eta_num);}
else {xLabel->DrawText(0.5+i,-2,eta_num);}
pLine->DrawLine(i,1,i,72);
}
}
示例7: DrawPeriod
//______________________________________________________________________________
void DrawPeriod(int runmin, int runmax, int run1, int run2, double ymin, double ymax, const char* label)
{
if ( run1 < runmin || run1 > runmax || run2 < runmin || run2 > runmax ) return;
TBox* b = new TBox(run1,ymin,run2,ymax);
b->SetFillColor(5);
b->Draw();
TText* text = new TText((run1+run2)/2.0,ymax*0.6,label);
text->SetTextAlign(22);
text->SetTextSize(0.02);
text->Draw();
}
示例8: fill_with_text
void fill_with_text(TGraph *real, TGraph *down, TGraph *up, TVirtualPad *can, int scantype, std::string scanx = "") {
can->cd();
float xpos_of_text = 0.22;
TLegend* this_leg = new TLegend(xpos_of_text,0.6,0.38,0.75);
//TLegend* this_leg = new TLegend(xpos_of_text,0.55,0.45,0.75,"n_{jets} #geq 3"); // this was the style of the paper.
this_leg->SetFillColor(0);
this_leg->SetBorderSize(0);
this_leg->SetTextSize(0.035);
//this_leg->SetTextSize(0.04); // paper style.
if(scantype==PlottingSetup::SMS||scantype==PlottingSetup::GMSB) {
//this_leg->AddEntry(real,"#sigma^{prod} = #sigma^{NLO-QCD}" , "l");
//this_leg->AddEntry(up,"#sigma^{prod} = 3 #times #sigma^{NLO-QCD}" , "l");
//this_leg->AddEntry(down,"#sigma^{prod} = 1/3 #times #sigma^{NLO-QCD}" , "l");
this_leg->AddEntry(real,"#sigma^{NLO-QCD}" , "l");
this_leg->AddEntry(up,"3 #times #sigma^{NLO-QCD}" , "l");
this_leg->AddEntry(down,"1/3 #times #sigma^{NLO-QCD}" , "l");
} else {
write_warning(__FUNCTION__,"Not implemented yet for mSUGRA");
}
this_leg->Draw();
TText *title = write_text(xpos_of_text+0.005,0.52,"JZB");
title->SetTextSize(0.04);
title->SetTextAlign(13);
title->SetTextFont(62);
title->Draw();
write_SMS_text( scantype, scanx, xpos_of_text );
// //string legT5zz="pp #rightarrow #tilde{g} #tilde{g}, #tilde{g} #rightarrow 2j + #chi^{0}_{1}, #chi^{0}_{1} #rightarrow Z + #tilde{G}";
// string legT5zz="pp #rightarrow #tilde{g} #tilde{g}, #tilde{g} #rightarrow 2j + #chi^{0}_{2}, #chi^{0}_{2} #rightarrow Z #chi^{0}_{1}";
// string legT5zzl2="m(#tilde{q}) >> m(#tilde{g}), x = "+scanx;
// string legT5zzl3=" GMSB";
// TText *title = write_text(xpos_of_text,0.85,legT5zz);
// title->SetTextAlign(11);
// title->SetTextSize(0.035);
// if(scantype!=PlottingSetup::mSUGRA) title->Draw("same");
// TText *title2 = write_text(xpos_of_text,0.79,legT5zzl2);
// title2->SetTextAlign(11);
// title2->SetTextSize(0.035);
// if(scantype!=PlottingSetup::mSUGRA) title2->Draw("same");
// TText *title3 = write_text(0.40,0.79,legT5zzl3);
// title3->SetTextAlign(11);
// title3->SetTextSize(0.035);
// title3->SetTextColor(kRed);
//// if(scantype==PlottingSetup::GMSB) title3->Draw("same");
DrawPrelim();
draw_diagonal_xchange( scantype, scanx );
}
示例9: AddText
//______________________________________________________________________________
void AddText(TPaveText *pave, const char *datamember, Int_t value, const char *comment)
{
char line[128];
for (Int_t i=0; i<128; i++) line[i] = ' ';
memcpy(&line[0], datamember, strlen(datamember));
line[10] = '=';
char number[20];
sprintf(number, "%5i", value);
memcpy(&line[12], number, strlen(number));
line[26] = '=';
line[27] = '>';
sprintf(&line[30], "%s",comment);
TText *text = pave->AddText(line);
text->SetTextAlign(12);
}
示例10: pHitSpecDet
TCanvas* pHitSpecDet(const std::string& s)
{
TCanvas* c = new TCanvas( ("HitSpecDet"+s).c_str(), ("HitSpecDet"+s).c_str(), -2);
c->SetLogx();
TH2D* h = (TH2D*)gROOT->FindObject(s.c_str());
h->GetXaxis()->SetRange(4,32);
std::stringstream str;
str<<h->GetTitle();
TText t;
t.SetTextColor(4);
t.SetTextAlign(11);
t.SetTextSize(0.035);
h->DrawCopy("box");
t.DrawTextNDC(0.17,0.2, str.str().c_str());
return c;
}
示例11: write_SMS_text
void write_SMS_text(int scantype, std::string& scanx, float xpos = 0.22 ) {
string legT5zz="pp #rightarrow #tilde{g} #tilde{g}, #tilde{g} #rightarrow 2j + #chi^{0}_{2}, #chi^{0}_{2} #rightarrow Z #chi^{0}_{1}";
if ( scantype==PlottingSetup::GMSB) legT5zz="pp #rightarrow #tilde{g} #tilde{g}, #tilde{g} #rightarrow 2j + #chi^{0}_{1}, #chi^{0}_{1} #rightarrow Z #tilde{G}";
string legT5zzl2="m(#tilde{q}) >> m(#tilde{g})";
if (scantype==PlottingSetup::SMS) legT5zzl2 += ", x = "+scanx;
string legT5zzl3=" GMSB";
TText *title = write_text(xpos,0.85,legT5zz);
title->SetTextAlign(11);
title->SetTextSize(0.035);
if(scantype!=PlottingSetup::mSUGRA) title->Draw("same");
TText *title2 = write_text(xpos,0.79,legT5zzl2);
title2->SetTextAlign(11);
title2->SetTextSize(0.035);
if(scantype!=PlottingSetup::mSUGRA) title2->Draw("same");
TText *title3 = write_text(0.40,0.79,legT5zzl3);
title3->SetTextAlign(11);
title3->SetTextSize(0.035);
title3->SetTextColor(kRed);
// if(scantype==PlottingSetup::GMSB) title3->Draw("same");
}
示例12: plot_example
void plot_example(){
THStack *hs = new THStack("hs","");
TH1F *h1 = new TH1F("h1","test hstack",10,-4,4);
h1->FillRandom("gaus",20000);
h1->SetFillColor(kRed);
hs->Add(h1);
TH1F *h2 = new TH1F("h2","test hstack",10,-4,4);
h2->FillRandom("gaus",15000);
h2->SetFillColor(kBlue);
hs->Add(h2);
TH1F *h3 = new TH1F("h3","test hstack",10,-4,4);
h3->FillRandom("gaus",10000);
h3->SetFillColor(kGreen);
hs->Add(h3);
TCanvas *cs = new TCanvas("cs","cs",10,10,700,900);
TText T; T.SetTextFont(42); T.SetTextAlign(21);
cs->Divide(2,2);
cs->cd(1); hs->Draw(); T.DrawTextNDC(.5,.95,"Default drawing option");
cs->cd(2); hs->Draw("nostack"); T.DrawTextNDC(.5,.95,"Option \"nostack\"");
cs->cd(3); hs->Draw("nostackb"); T.DrawTextNDC(.5,.95,"Option \"nostackb\"");
cs->cd(4); hs->Draw("lego1"); T.DrawTextNDC(.5,.95,"Option \"lego1\"");
}
示例13: hlHisto4
void hlHisto4()
{
TCanvas *c1 = new TCanvas("c1", "", 0, 0, 600, 400);
TF1 *f1 = new TF1("f1", "x*gaus(0) + [3]*abs(sin(x)/x)", -50.0, 50.0);
f1->SetParameters(20.0, 4.0, 1.0, 20.0);
TH1F *h1 = new TH1F("h1", "Test random numbers", 200, -50.0, 50.0);
h1->FillRandom("f1", 100000);
h1->Draw();
h1->Fit(f1, "Q");
gStyle->SetGridColor(kGray);
c1->SetGrid();
TText *info = new TText(0.0, h1->GetMaximum()*0.7, "please move the mouse over the frame");
info->SetTextSize(0.04);
info->SetTextAlign(22);
info->SetTextColor(kRed-1);
info->SetBit(kCannotPick);
info->Draw();
c1->Update();
h1->SetHighlight();
c1->HighlightConnect("HighlightZoom(TVirtualPad*,TObject*,Int_t,Int_t)");
}
示例14: pstable
void pstable()
{
// Display all possible types of ROOT/Postscript characters
const char *symbol1[] =
{"A","B","C","D","E","F","G","H","I","J","K","L","M","N",
"O","P","Q","R","S","T","U","V","W","X","Y","Z",
"0","1","2","3","4","5","6","7","8","9",
".",",","+","-","*","/","=","(",")","{","}","END"};
const char *symbol2[] =
{"a","b","c","d","e","f","g","h","i","j","k","l","m","n",
"o","p","q","r","s","t","u","v","w","x","y","z",
":",";","@","\\","_","|","%",
"@'","<",">","[","]","\42","@\43","@\136",
"@\77","@\41","@&","$","@\176"," ","END"};
const char *symbol3[] =
{"\241","\242","\243","\244","\245","\246","\247","\250",
"\251","\252","\253","\254","\255","\256","\257","\260",
"\261","\262","\263","\264","\265","\266","\267","\270",
"\271","\272","\273","\274","\275","\276","\277","\300",
"\301","\302","\303","\304","\305","\306","\307","\310",
"\311","\312","\313","\314","\315","\316","\317","END"};
const char *symbol4[] =
{"\321","\322","\323","\324","\325","\326","\327","\330",
"\331","\332","\333","\334","\335","\336","\337","\340",
"\341","\342","\343","\344","\345","\346","\347","\340",
"\351","\352","\353","\354","\355","\356","\357","\360",
"\361","\362","\363","\364","\365","\366","\367","\370",
"\371","\372","\373","\374","\375","\376","\377","END"};
const char *symbol5[] =
{"\177","\200","\201","\202","\203","\204","\205","\206",
"\207","\210","\211","\212","\213","\214","\215","\216",
"\217","\220","\221","\222","\223","\224","\225","\226",
"\227","\230","\231","\232","\233","\234","\235","\236",
"\237","\240","END"};
Float_t xrange = 18;
Float_t yrange = 25;
Int_t w = 650;
Int_t h = w*yrange/xrange;
TCanvas *c1 = new TCanvas("c1","c1",200,10,w,h);
c1->Range(0,0,xrange,yrange);
TText *t = new TText(0,0,"a");
t->SetTextSize(0.02);
t->SetTextFont(62);
t->SetTextAlign(22);
table(0.5,0.5*xrange-0.5,yrange,t,symbol1,0);
table(0.5*xrange+0.5,xrange-0.5,yrange,t,symbol2,0);
TText *tlabel = new TText(0,0,"a");
tlabel->SetTextFont(72);
tlabel->SetTextSize(0.018);
tlabel->SetTextAlign(22);
tlabel->DrawText(0.5*xrange,1.3,
"Input characters are standard keyboard characters");
c1->Modified();
c1->Update();
c1->Print("pstable1.ps");
TCanvas *c2 = new TCanvas("c2","c2",220,20,w,h);
c2->Range(0,0,xrange,yrange);
table(0.5,0.5*xrange-0.5,yrange,t,symbol3,1);
table(0.5*xrange+0.5,xrange-0.5,yrange,t,symbol4,1);
tlabel->DrawText(0.5*xrange,1.3,
"Input characters using backslash and octal numbers");
c2->Modified();
c2->Update();
c2->Print("pstable2.ps");
TCanvas *c3 = new TCanvas("c3","c3",240,20,w,h);
c3->Range(0,0,xrange,yrange);
table(0.5,0.5*xrange-0.5,yrange,t,symbol5,1);
tlabel->DrawText(0.5*xrange,1.3,
"Input characters using backslash and octal numbers");
c3->Modified();
c3->Update();
c3->Print("pstable3.ps");
}
示例15: analyze
void analyze() {
TCanvas *c1 = new TCanvas("c1","Analyze.mac",620,790);
c1->Range(-1,0,19,30);
TPaveLabel *pl1 = new TPaveLabel(0,27,3.5,29,"Analyze");
pl1->SetFillColor(42);
pl1->Draw();
TPaveText *pt1 = new TPaveText(0,22.8,4,25.2);
TText *t1 = pt1->AddText("Parenthesis matching");
TText *t2 = pt1->AddText("Remove unnecessary");
TText *t2a = pt1->AddText("parenthesis");
pt1->Draw();
TPaveText *pt2 = new TPaveText(6,23,10,25);
TText *t3 = pt2->AddText("break of");
TText *t4 = pt2->AddText("Analyze");
pt2->Draw();
TPaveText *pt3 = new TPaveText(0,19,4,21);
t4=pt3->AddText("look for simple");
TText *t5 = pt3->AddText("operators");
pt3->Draw();
TPaveText *pt4 = new TPaveText(0,15,4,17);
TText *t6 = pt4->AddText("look for an already");
TText *t7 = pt4->AddText("defined expression");
pt4->Draw();
TPaveText *pt5 = new TPaveText(0,11,4,13);
TText *t8 = pt5->AddText("look for usual");
TText *t9 = pt5->AddText("functions :cos sin ..");
pt5->Draw();
TPaveText *pt6 = new TPaveText(0,7,4,9);
TText *t10 = pt6->AddText("look for a");
TText *t11 = pt6->AddText("numeric value");
pt6->Draw();
TPaveText *pt7 = new TPaveText(6,18.5,10,21.5);
TText *t12 = pt7->AddText("Analyze left and");
TText *t13 = pt7->AddText("right part of");
TText *t14 = pt7->AddText("the expression");
pt7->Draw();
TPaveText *pt8 = new TPaveText(6,15,10,17);
TText *t15 = pt8->AddText("Replace expression");
pt8->Draw();
TPaveText *pt9 = new TPaveText(6,11,10,13);
TText *t16 = pt9->AddText("Analyze");
pt9->SetFillColor(42);
pt9->Draw();
TPaveText *pt10 = new TPaveText(6,7,10,9);
TText *t17 = pt10->AddText("Error");
TText *t18 = pt10->AddText("Break of Analyze");
pt10->Draw();
TPaveText *pt11 = new TPaveText(14,22,17,24);
pt11->SetFillColor(42);
TText *t19 = pt11->AddText("Analyze");
TText *t19a = pt11->AddText("Left");
pt11->Draw();
TPaveText *pt12 = new TPaveText(14,19,17,21);
pt12->SetFillColor(42);
TText *t20 = pt12->AddText("Analyze");
TText *t20a = pt12->AddText("Right");
pt12->Draw();
TPaveText *pt13 = new TPaveText(14,15,18,18);
TText *t21 = pt13->AddText("StackNumber++");
TText *t22 = pt13->AddText("operator[StackNumber]");
TText *t23 = pt13->AddText("= operator found");
pt13->Draw();
TPaveText *pt14 = new TPaveText(12,10.8,17,13.2);
TText *t24 = pt14->AddText("StackNumber++");
TText *t25 = pt14->AddText("operator[StackNumber]");
TText *t26 = pt14->AddText("= function found");
pt14->Draw();
TPaveText *pt15 = new TPaveText(6,7,10,9);
TText *t27 = pt15->AddText("Error");
TText *t28 = pt15->AddText("break of Analyze");
pt15->Draw();
TPaveText *pt16 = new TPaveText(0,2,7,5);
TText *t29 = pt16->AddText("StackNumber++");
TText *t30 = pt16->AddText("operator[StackNumber] = 0");
TText *t31 = pt16->AddText("value[StackNumber] = value found");
pt16->Draw();
TArrow *ar = new TArrow(2,27,2,25.4,0.012,"|>");
ar->SetFillColor(1);
ar->Draw();
ar->DrawArrow(2,22.8,2,21.2,0.012,"|>");
ar->DrawArrow(2,19,2,17.2,0.012,"|>");
ar->DrawArrow(2,15,2,13.2,0.012,"|>");
ar->DrawArrow(2,11,2, 9.2,0.012,"|>");
ar->DrawArrow(2, 7,2, 5.2,0.012,"|>");
ar->DrawArrow(4,24,6,24,0.012,"|>");
ar->DrawArrow(4,20,6,20,0.012,"|>");
ar->DrawArrow(4,16,6,16,0.012,"|>");
ar->DrawArrow(4,12,6,12,0.012,"|>");
ar->DrawArrow(4, 8,6, 8,0.012,"|>");
ar->DrawArrow(10,20,14,20,0.012,"|>");
ar->DrawArrow(12,23,14,23,0.012,"|>");
ar->DrawArrow(12,16.5,14,16.5,0.012,"|>");
ar->DrawArrow(10,12,12,12,0.012,"|>");
TText *ta = new TText(2.2,22.2,"err = 0");
ta->SetTextFont(71);
ta->SetTextSize(0.015);
ta->SetTextColor(4);
ta->SetTextAlign(12);
ta->Draw();
ta->DrawText(2.2,18.2,"not found");
//.........这里部分代码省略.........