Skip to content

Instantly share code, notes, and snippets.

@pn11
Last active October 25, 2016 15:17
Show Gist options
  • Save pn11/79db8bc6e247d3e43688d308d48b6001 to your computer and use it in GitHub Desktop.
Save pn11/79db8bc6e247d3e43688d308d48b6001 to your computer and use it in GitHub Desktop.
{
TCanvas *c = new TCanvas("c", "c", 1000, 1000);
c->SetLogx();
c->SetLogy();
c->SetGridx();
c->SetGridy();
TGraph *gaxis = new TGraph();
gaxis->SetPoint(0, 1.0e8, 1.0e-16);
gaxis->SetPoint(1, 1.0e20, 1.0e-9);
gaxis->Draw("ap");
TF1 *f1 = new TF1("f1", "[0] / sqrt(x)", 1e7, 1e21);
f1->SetParameter(0, 3.0e-6);
f1->SetLineColor(kBlack);
f1->SetLineStyle(0);
f1->Draw("same");
TLine *lcosmo = new TLine(1e8, 1e-15, 1e20, 1e-15);
lcosmo->SetLineWidth(2);
lcosmo->Draw();
//TText *tt1 = new TText(2e8, 2e15, "Cosomology");
TLine *lHB = new TLine(1e8, 1e-10, 1e20, 1e-10);
lHB->SetLineWidth(2);
lHB->Draw();
TLine *lKK = new TLine(1e13, 9.2e-14, 1e14, 9.2e-14);
lKK->SetLineWidth(4);
lKK->SetLineColor(kRed);
lKK->Draw();
c->Print("canv.pdf", "pdf landscape");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment