Locked History Actions

attachment:plot_oddz_evenn_jpi.C of 核図表

Attachment 'plot_oddz_evenn_jpi.C'

Download

#include "TROOT.h"
#include "TStyle.h"
#include "TLatex.h"
#include "TCanvas.h"
#include "TColor.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(1015,"z");
  gStyle->SetTickLength(0.02,"xyz");
  gStyle->SetLabelSize(0.075,"xy");
  gStyle->SetLabelSize(0.05,"z");
  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);

  Int_t MyPalette[15];
  Double_t r[]    = {0.00, 0.00, 1.00, 1.00, 0.50};
  Double_t g[]    = {0.00, 0.00, 1.00, 0.00, 0.00};
  Double_t b[]    = {0.50, 1.00, 1.00, 0.00, 0.00};
  Double_t stop[] = {0.00, 0.30, 0.50, 0.70, 1.00};
  Int_t FI = TColor::CreateGradientColorTable(5, stop, r, g, b, 15);
  for (int i=0;i<15;i++) MyPalette[i] = FI+i;
  gStyle->SetPalette(15, MyPalette);
  gStyle->SetNumberContours(15);
}

void plot_oddz_evenn_jpi(){
  setstyle();

  TCanvas *c1 = new TCanvas("c1","c1",500,400); 
  TH2D *h = new TH2D("h","#it{J^{#pi}} of ground states",81,-1.,161.,56,0.,112.);
  std::ifstream ifs("oddz_evenn_jpi.dat");
  Int_t n,z;
  Double_t jpi2;
  while (ifs >> z >> n >> jpi2) {
    h->Fill(n,z,jpi2/2.);
  }
  h->SetMaximum(7.3);
  h->SetMinimum(-7.3);
  h->Draw("colz");
  h->GetXaxis()->SetTitle("Neutron number #it{N}");
  h->GetYaxis()->SetTitle("Proton number #it{Z}");
  h->GetXaxis()->CenterTitle();
  h->GetYaxis()->CenterTitle();

  TLatex Tl;
  Tl.SetTextAlign(12);
  Tl.SetNDC();
  Tl.SetTextSize(0.075);
  Tl.DrawLatex(0.20,0.80,"#it{Z}: odd");
  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.