Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
sPHENIXplots.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file sPHENIXplots.C
1 //provisional macro to standardize plotting scheme for approved sPHENIX plots
2 //May 30 2023
3 
4 #include "sPhenixStyle.h"
5 #include "sPhenixStyle.C"
6 
8 {
10 
11  TCanvas *c = new TCanvas("c", "c", 685, 630);
12  gPad->SetLogz();
13  gPad->SetRightMargin(0.15);
14 
15  TLegend *leg = new TLegend(.12,.78,.4,.9);
16  leg->SetFillStyle(0);
17  leg->AddEntry("","#it{#bf{sPHENIX}} Preliminary","");
18  leg->AddEntry("","Au+Au #sqrt{s_{NN}} = 200 GeV","");
19 
20  TH2D *h = new TH2D("", "", 100, 0, 1, 100, 0, 1);
21  h->GetYaxis()->SetNdivisions(405);
22  h->GetXaxis()->SetNdivisions(405);
23  h->SetXTitle("x-axis title [arb. units]");
24  h->SetYTitle("y-axis title [arb. units]");
25  h->Draw("col z");
26  leg->Draw("same");
27  TLatex l;
28  l.SetNDC();
29  l.SetTextFont(43);
30  l.SetTextSize(25);
31  l.DrawLatex(0.7, 0.965, "#it{7/21/2023}");
32 
33  c->Print("plot1.pdf");
34 }