1,6 → 1,9 |
//########################################################################################## |
#include "TGaxis.h" |
#include "TColor.h" |
|
#include "include/RTUtil.h" |
|
//########################################################################################## |
void RTSetStyle(TStyle *style) |
{ |
style->SetStatBorderSize(1); |
13,12 → 16,23 |
style->SetStatColor(0); |
style->SetPalette(1, 0); |
|
style->SetMarkerStyle(kFullDotLarge); |
//style->SetMarkerSize(7); |
|
style->SetOptStat("ne"); |
style->SetOptFit(1); |
|
style->SetPadTopMargin(0.10); |
style->SetPadBottomMargin(0.10); |
style->SetPadLeftMargin(0.10); |
style->SetPadRightMargin(0.12); |
style->SetPadBottomMargin(0.12); |
style->SetPadLeftMargin(0.12); |
style->SetPadRightMargin(0.15); |
|
style->SetTitleOffset(1.3, "y"); |
style->SetTitleOffset(1.5, "y"); |
style->SetPalette(1, 0); |
|
style->SetPaperSize(TStyle::kA4); |
|
TGaxis::SetMaxDigits(4); |
} |
//########################################################################################## |
RTCanvas::RTCanvas() |
49,6 → 63,19 |
pad->Divide(nx, ny, 0.003, 0.005); |
} |
//------------------------------------------------------------------------------------------ |
void RTCanvas::Divide(int np) |
{ |
if( np==2 ) pad->Divide(1, 2, 0.003, 0.005); |
else if( 2<np && np<=4 ) pad->Divide(2, 2, 0.003, 0.005); |
else if( 4<np && np<=6 ) pad->Divide(2, 3, 0.003, 0.005); |
else if( 6<np && np<=8 ) pad->Divide(2, 4, 0.003, 0.005); |
else if( np==9 ) pad->Divide(3, 3, 0.003, 0.005); |
else if( 9<np && np<=12) pad->Divide(3, 4, 0.003, 0.005); |
else if(12<np && np<=16) pad->Divide(4, 4, 0.003, 0.005); |
else if(16<np && np<=25) pad->Divide(5, 5, 0.003, 0.005); |
else if(25<np && np<=32) pad->Divide(4, 8, 0.003, 0.005); |
} |
//------------------------------------------------------------------------------------------ |
TPad* RTCanvas::cd(int i) |
{ |
return (TPad*)(pad->cd(i)); |
58,6 → 85,22 |
{ |
can->SaveAs(filename); |
} |
//------------------------------------------------------------------------------------------ |
void RTCanvas::Update() |
{ |
can->Update(); |
} |
|
void SetGS() |
{ |
const Int_t Number = 2; |
Double_t Red[Number] = {1.0, 0.0}; |
Double_t Green[Number] = {1.0, 0.0}; |
Double_t Blue[Number] = {1.0, 0.0}; |
Double_t Stops[Number] = {0.0, 1.0}; |
Int_t nb = 50; |
TColor::CreateGradientColorTable(Number, Stops, Red, Green, Blue, nb); |
} |
//########################################################################################## |
|
|