Locked History Actions

attachment:plot_first2plus.C of 核図表

Attachment 'plot_first2plus.C'

Download

#include "TROOT.h"
#include "TStyle.h"
#include "TLatex.h"
#include "TCanvas.h"
#include "TAxis.h"
#include "TH2.h"
#include <fstream>

void setstyle(){
  gROOT->SetStyle("Plain");
  gStyle->SetTitleAlign(23);
  gStyle->SetTitleX(0.54);
  gStyle->SetTitleY(0.97);
  gStyle->SetTitleBorderSize(0);
  gStyle->SetTitleFillColor(0);
  gStyle->SetTitleColor(1);
  gStyle->SetLabelFont(132,"xyz");
  gStyle->SetTitleFont(132,"xyz");
  gStyle->SetTitleFont(132,"");
  gStyle->SetTextFont(132);
  gStyle->SetStatFont(132);
  gStyle->SetOptStat(0);
  gStyle->SetNdivisions(510,"xyz");
  gStyle->SetNdivisions(505,"z");
  gStyle->SetLabelSize(0.075,"xyz");
  gStyle->SetTitleSize(0.075,"xyz");
  gStyle->SetTitleSize(0.075,"");
  gStyle->SetPadTopMargin(0.15);
  gStyle->SetPadRightMargin(0.10);
  gStyle->SetPadLeftMargin(0.15);
  gStyle->SetPadBottomMargin(0.18);
  gStyle->SetOptLogz(0);
}

void plot_first2plus(){
  setstyle();
  TCanvas *c1 = new TCanvas("c1","c1",500,400); 
  TH2D *h = new TH2D("h","2^{+}_{1} energies (MeV)",81,-1.,161.,56,-1.,111.);
  std::ifstream ifs("first2plus.dat");
  Int_t n,z;
  Double_t e;
  while (ifs >> z >> n >> e) {
    h->Fill(n,z,e/1000.);
  }
  h->SetMaximum(4);
  h->GetXaxis()->SetTitle("Neutron number #it{N}");
  h->GetYaxis()->SetTitle("Proton number #it{Z}");
  h->GetXaxis()->CenterTitle();
  h->GetYaxis()->CenterTitle();
  h->Draw("colz");

  TLatex Tl;
  Tl.SetTextAlign(12);
  Tl.SetNDC();
  Tl.SetTextSize(0.075);
  Tl.DrawLatex(0.20,0.80,"#it{Z}: even");
  Tl.DrawLatex(0.20,0.73,"#it{N}: even");
}

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2011-08-15 12:31:59, 11.7 KB) [[attachment:DrawKTUY05DripLine.C]]
  • [get | view] (2011-08-15 12:30:05, 4.2 KB) [[attachment:DrawStableNuclei.C]]
  • [get | view] (2011-08-15 10:52:12, 0.4 KB) [[attachment:Ini.C]]
  • [get | view] (2011-08-15 11:22:39, 423.9 KB) [[attachment:KTUY05_m246.dat]]
  • [get | view] (2011-08-15 11:21:45, 13.3 KB) [[attachment:KTUY05_m246.png]]
  • [get | view] (2011-08-15 11:19:56, 325.8 KB) [[attachment:KTUY05_m246.root]]
  • [get | view] (2011-08-15 12:44:15, 14.4 KB) [[attachment:KTUY_stable.png]]
  • [get | view] (2011-08-15 12:44:47, 9.9 KB) [[attachment:KTUYdl_stable.png]]
  • [get | view] (2011-08-15 11:40:48, 37.7 KB) [[attachment:LiseMassExcess.png]]
  • [get | view] (2011-08-15 11:55:08, 14.6 KB) [[attachment:LiseMassExcessType.png]]
  • [get | view] (2011-08-15 11:19:33, 3.1 KB) [[attachment:MakeKTUY05RootFile.C]]
  • [get | view] (2011-08-15 10:53:14, 1.2 KB) [[attachment:MakeStableNucleiRootFile.C]]
  • [get | view] (2011-08-11 17:37:50, 25.6 KB) [[attachment:NuclearWalletCardsSearch_GetStableNuclei.png]]
  • [get | view] (2011-09-03 04:16:45, 1.2 KB) [[attachment:PlotKTUY.C]]
  • [get | view] (2011-08-15 10:53:26, 0.5 KB) [[attachment:PlotStable.C]]
  • [get | view] (2011-08-15 10:49:44, 8.6 KB) [[attachment:StableNuclei.png]]
  • [get | view] (2011-08-15 10:53:40, 6.0 KB) [[attachment:StableNuclei.root]]
  • [get | view] (2011-08-11 17:50:57, 36.5 KB) [[attachment:StableNuclei.txt]]
  • [get | view] (2013-11-01 17:25:58, 15.2 KB) [[attachment:evenz_oddn_jpi.dat]]
  • [get | view] (2013-11-01 08:50:14, 12.0 KB) [[attachment:first2plus.dat]]
  • [get | view] (2013-11-01 09:06:27, 43.2 KB) [[attachment:first2plus_ss.png]]
  • [get | view] (2013-11-01 17:25:07, 14.7 KB) [[attachment:oddz_evenn_jpi.dat]]
  • [get | view] (2013-11-01 17:26:05, 2.0 KB) [[attachment:plot_evenz_oddn_jpi.C]]
  • [get | view] (2013-11-01 17:26:10, 11.9 KB) [[attachment:plot_evenz_oddn_jpi.png]]
  • [get | view] (2013-11-01 08:49:50, 1.5 KB) [[attachment:plot_first2plus.C]]
  • [get | view] (2013-11-01 08:50:03, 11.5 KB) [[attachment:plot_first2plus.png]]
  • [get | view] (2013-11-01 17:25:18, 2.0 KB) [[attachment:plot_oddz_evenn_jpi.C]]
  • [get | view] (2013-11-01 17:25:23, 11.8 KB) [[attachment:plot_oddz_evenn_jpi.png]]

You are not allowed to attach a file to this page.