{ //=========Macro generated from canvas: c1/hists with different scales //========= (Fri Mar 7 20:08:47 2014) by ROOT version5.99/01 TCanvas *c1 = new TCanvas("c1", "hists with different scales",1921,20,1344,1059); gStyle->SetOptTitle(0); c1->Range(1.72497,0.875,4.261877,2.125); c1->SetFillColor(0); c1->SetBorderMode(0); c1->SetBorderSize(2); c1->SetFrameBorderMode(0); c1->SetFrameBorderMode(0); TGraph *graph = new TGraph(36); graph->SetName("Graph"); graph->SetTitle("Graph"); graph->SetFillColor(1); graph->SetMarkerStyle(7); graph->SetPoint(0,1.907449011,1.456535); graph->SetPoint(1,1.937252902,1.456812); graph->SetPoint(2,1.968002948,1.4571); graph->SetPoint(3,1.999744931,1.457399); graph->SetPoint(4,2.032527634,1.457712); graph->SetPoint(5,2.066403095,1.458038); graph->SetPoint(6,2.101426876,1.458378); graph->SetPoint(7,2.137658374,1.458735); graph->SetPoint(8,2.175161153,1.459108); graph->SetPoint(9,2.214003316,1.4595); graph->SetPoint(10,2.254257922,1.459911); graph->SetPoint(11,2.296003439,1.460344); graph->SetPoint(12,2.339324259,1.460799); graph->SetPoint(13,2.384311264,1.46128); graph->SetPoint(14,2.431062465,1.461789); graph->SetPoint(15,2.479683714,1.462326); graph->SetPoint(16,2.530289504,1.462897); graph->SetPoint(17,2.583003869,1.463502); graph->SetPoint(18,2.637961398,1.464146); graph->SetPoint(19,2.695308385,1.464833); graph->SetPoint(20,2.755204127,1.465566); graph->SetPoint(21,2.817822402,1.46635); graph->SetPoint(22,2.883353156,1.46719); graph->SetPoint(23,2.952004422,1.468094); graph->SetPoint(24,3.024004529,1.469066); graph->SetPoint(25,3.099604643,1.470116); graph->SetPoint(26,3.179081685,1.471252); graph->SetPoint(27,3.262741729,1.472485); graph->SetPoint(28,3.350923938,1.473826); graph->SetPoint(29,3.444005158,1.475289); graph->SetPoint(30,3.542405306,1.476891); graph->SetPoint(31,3.646593697,1.478651); graph->SetPoint(32,3.757096536,1.480592); graph->SetPoint(33,3.874505803,1.482739); graph->SetPoint(34,3.999489861,1.485127); graph->SetPoint(35,4.13280619,1.487793); TH1F *Graph_Graph1 = new TH1F("Graph_Graph1","Graph",100,1.684913,4.355342); Graph_Graph1->SetMinimum(1); Graph_Graph1->SetMaximum(2); Graph_Graph1->SetDirectory(0); Graph_Graph1->SetStats(0); Int_t ci; // for color index setting ci = TColor::GetColor("#000099"); Graph_Graph1->SetLineColor(ci); Graph_Graph1->GetXaxis()->SetTitle("photon energy, [eV]"); Graph_Graph1->GetXaxis()->SetRange(12,87); Graph_Graph1->GetXaxis()->SetLabelFont(42); Graph_Graph1->GetXaxis()->SetLabelSize(0.035); Graph_Graph1->GetXaxis()->SetTitleSize(0.035); Graph_Graph1->GetXaxis()->SetTitleFont(42); Graph_Graph1->GetYaxis()->SetTitle("refractive index"); Graph_Graph1->GetYaxis()->SetLabelFont(42); Graph_Graph1->GetYaxis()->SetLabelSize(0.035); Graph_Graph1->GetYaxis()->SetTitleSize(0.035); Graph_Graph1->GetYaxis()->SetTitleFont(42); Graph_Graph1->GetZaxis()->SetLabelFont(42); Graph_Graph1->GetZaxis()->SetLabelSize(0.035); Graph_Graph1->GetZaxis()->SetTitleSize(0.035); Graph_Graph1->GetZaxis()->SetTitleFont(42); graph->SetHistogram(Graph_Graph1); graph->Draw("acp"); graph = new TGraph(36); graph->SetName("Graph"); graph->SetTitle("Graph"); graph->SetFillColor(1); graph->SetMarkerStyle(7); graph->SetPoint(0,1.907449011,1.554034); graph->SetPoint(1,1.937252902,1.555575); graph->SetPoint(2,1.968002948,1.55698); graph->SetPoint(3,1.999744931,1.558266); graph->SetPoint(4,2.032527634,1.559454); graph->SetPoint(5,2.066403095,1.56056); graph->SetPoint(6,2.101426876,1.561604); graph->SetPoint(7,2.137658374,1.562604); graph->SetPoint(8,2.175161153,1.563579); graph->SetPoint(9,2.214003316,1.564547); graph->SetPoint(10,2.254257922,1.565526); graph->SetPoint(11,2.296003439,1.566536); graph->SetPoint(12,2.339324259,1.567595); graph->SetPoint(13,2.384311264,1.568721); graph->SetPoint(14,2.431062465,1.569933); graph->SetPoint(15,2.479683714,1.57125); graph->SetPoint(16,2.530289504,1.57269); graph->SetPoint(17,2.583003869,1.574271); graph->SetPoint(18,2.637961398,1.576012); graph->SetPoint(19,2.695308385,1.577932); graph->SetPoint(20,2.755204127,1.580049); graph->SetPoint(21,2.817822402,1.582381); graph->SetPoint(22,2.883353156,1.584948); graph->SetPoint(23,2.952004422,1.587768); graph->SetPoint(24,3.024004529,1.590859); graph->SetPoint(25,3.099604643,1.59424); graph->SetPoint(26,3.179081685,1.597929); graph->SetPoint(27,3.262741729,1.601946); graph->SetPoint(28,3.350923938,1.606307); graph->SetPoint(29,3.444005158,1.611033); graph->SetPoint(30,3.542405306,1.616141); graph->SetPoint(31,3.646593697,1.621651); graph->SetPoint(32,3.757096536,1.62758); graph->SetPoint(33,3.874505803,1.633947); graph->SetPoint(34,3.999489861,1.640771); graph->SetPoint(35,4.13280619,1.64807); TH1F *Graph_Graph2 = new TH1F("Graph_Graph2","Graph",100,1.684913,4.355342); Graph_Graph2->SetMinimum(1.54463); Graph_Graph2->SetMaximum(1.657474); Graph_Graph2->SetDirectory(0); Graph_Graph2->SetStats(0); ci = TColor::GetColor("#000099"); Graph_Graph2->SetLineColor(ci); Graph_Graph2->GetXaxis()->SetLabelFont(42); Graph_Graph2->GetXaxis()->SetLabelSize(0.035); Graph_Graph2->GetXaxis()->SetTitleSize(0.035); Graph_Graph2->GetXaxis()->SetTitleFont(42); Graph_Graph2->GetYaxis()->SetLabelFont(42); Graph_Graph2->GetYaxis()->SetLabelSize(0.035); Graph_Graph2->GetYaxis()->SetTitleSize(0.035); Graph_Graph2->GetYaxis()->SetTitleFont(42); Graph_Graph2->GetZaxis()->SetLabelFont(42); Graph_Graph2->GetZaxis()->SetLabelSize(0.035); Graph_Graph2->GetZaxis()->SetTitleSize(0.035); Graph_Graph2->GetZaxis()->SetTitleFont(42); graph->SetHistogram(Graph_Graph2); graph->Draw(" cp"); graph = new TGraph(36); graph->SetName("Graph"); graph->SetTitle("Graph"); graph->SetFillColor(1); graph->SetMarkerStyle(7); graph->SetPoint(0,1.907449011,1.433055); graph->SetPoint(1,1.937252902,1.433369); graph->SetPoint(2,1.968002948,1.433698); graph->SetPoint(3,1.999744931,1.434045); graph->SetPoint(4,2.032527634,1.434409); graph->SetPoint(5,2.066403095,1.434793); graph->SetPoint(6,2.101426876,1.435198); graph->SetPoint(7,2.137658374,1.435626); graph->SetPoint(8,2.175161153,1.436077); graph->SetPoint(9,2.214003316,1.436555); graph->SetPoint(10,2.254257922,1.4371); graph->SetPoint(11,2.296003439,1.4376); graph->SetPoint(12,2.339324259,1.4382); graph->SetPoint(13,2.384311264,1.4388); graph->SetPoint(14,2.431062465,1.4395); graph->SetPoint(15,2.479683714,1.4402); graph->SetPoint(16,2.530289504,1.4409); graph->SetPoint(17,2.583003869,1.4415); graph->SetPoint(18,2.637961398,1.4425); graph->SetPoint(19,2.695308385,1.4434); graph->SetPoint(20,2.755204127,1.4444); graph->SetPoint(21,2.817822402,1.4455); graph->SetPoint(22,2.883353156,1.4464); graph->SetPoint(23,2.952004422,1.4479); graph->SetPoint(24,3.024004529,1.4501); graph->SetPoint(25,3.099604643,1.450428); graph->SetPoint(26,3.179081685,1.451976); graph->SetPoint(27,3.262741729,1.453666); graph->SetPoint(28,3.350923938,1.455513); graph->SetPoint(29,3.444005158,1.45754); graph->SetPoint(30,3.542405306,1.45977); graph->SetPoint(31,3.646593697,1.462231); graph->SetPoint(32,3.757096536,1.464958); graph->SetPoint(33,3.874505803,1.467991); graph->SetPoint(34,3.999489861,1.471377); graph->SetPoint(35,4.13280619,1.475174); TH1F *Graph_Graph3 = new TH1F("Graph_Graph3","Graph",100,1.684913,4.355342); Graph_Graph3->SetMinimum(1.428843); Graph_Graph3->SetMaximum(1.479386); Graph_Graph3->SetDirectory(0); Graph_Graph3->SetStats(0); ci = TColor::GetColor("#000099"); Graph_Graph3->SetLineColor(ci); Graph_Graph3->GetXaxis()->SetLabelFont(42); Graph_Graph3->GetXaxis()->SetLabelSize(0.035); Graph_Graph3->GetXaxis()->SetTitleSize(0.035); Graph_Graph3->GetXaxis()->SetTitleFont(42); Graph_Graph3->GetYaxis()->SetLabelFont(42); Graph_Graph3->GetYaxis()->SetLabelSize(0.035); Graph_Graph3->GetYaxis()->SetTitleSize(0.035); Graph_Graph3->GetYaxis()->SetTitleFont(42); Graph_Graph3->GetZaxis()->SetLabelFont(42); Graph_Graph3->GetZaxis()->SetLabelSize(0.035); Graph_Graph3->GetZaxis()->SetTitleSize(0.035); Graph_Graph3->GetZaxis()->SetTitleFont(42); graph->SetHistogram(Graph_Graph3); graph->Draw(" cp"); TGaxis *gaxis = new TGaxis(1.99866,2,4.008186,2,310,620,510,"-"); gaxis->SetLabelOffset(0.005); gaxis->SetLabelSize(0.04); gaxis->SetTickSize(0.03); gaxis->SetGridLength(0); gaxis->SetTitleOffset(1); gaxis->SetTitleSize(0.04); gaxis->SetTitleColor(1); gaxis->SetTitleFont(24); gaxis->SetTitle("photon wavelength"); gaxis->Draw(); c1->Modified(); c1->cd(); c1->SetSelected(c1); }