{ //=========Macro generated from canvas: c1/c1 //========= (Fri Jun 17 15:16:16 2011) by ROOT version5.28/00c TCanvas *c1 = new TCanvas("c1", "c1",10,51,700,500); gROOT->SetEditHistograms(); c1->Range(-1.25,-0.01167981,11.25,17.04262); c1->SetBorderSize(2); c1->SetGridx(); c1->SetGridy(); c1->SetFrameFillColor(0); TF1 *FT = new TF1("FT","2.25+1.25*x",0,10); FT->SetFillColor(19); FT->SetFillStyle(0); Int_t ci; // for color index setting ci = TColor::GetColor("#996666"); FT->SetLineColor(ci); FT->SetLineWidth(3); FT->GetXaxis()->SetTitle("Cups of Largest Coffee [Cups]"); FT->GetYaxis()->SetTitle("Total Cost U.S.D./[Cups]"); FT->Draw(""); TPaveText *pt = new TPaveText(0.3275862,0.9004237,0.6968391,0.9449153,"blNDC"); pt->SetName("title"); pt->SetBorderSize(2); TText *text = pt->AddText("2.25+1.25*x"); pt->Draw(); TF1 *Bar = new TF1("Bar","2.70+.75*x",0.5,10); Bar->SetFillColor(19); Bar->SetFillStyle(0); ci = TColor::GetColor("#0066cc"); Bar->SetLineColor(ci); Bar->SetLineWidth(3); Bar->Draw("SAME"); TLegend *leg = new TLegend(0.2097701,0.690678,0.5445402,0.7881356,NULL,"brNDC"); leg->SetTextFont(62); leg->SetLineColor(1); leg->SetLineStyle(1); leg->SetLineWidth(1); leg->SetFillColor(19); leg->SetFillStyle(1001); TLegendEntry *entry=leg->AddEntry("NULL","Local Coffee Houses:","h"); entry->SetLineColor(1); entry->SetLineStyle(1); entry->SetLineWidth(1); entry->SetMarkerColor(1); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); entry->SetTextFont(62); entry=leg->AddEntry("FT","Fair Trade","l"); ci = TColor::GetColor("#996666"); entry->SetLineColor(ci); entry->SetLineStyle(1); entry->SetLineWidth(3); entry->SetMarkerColor(1); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); entry=leg->AddEntry("Bar","Barriques","l"); ci = TColor::GetColor("#0066cc"); entry->SetLineColor(ci); entry->SetLineStyle(1); entry->SetLineWidth(3); entry->SetMarkerColor(1); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); leg->Draw(); leg = new TLegend(0.2298851,0.6927966,0.5445402,0.7902542,NULL,"brNDC"); leg->SetTextFont(62); leg->SetLineColor(1); leg->SetLineStyle(1); leg->SetLineWidth(1); leg->SetFillColor(19); leg->SetFillStyle(1001); entry=leg->AddEntry("NULL","Local Coffee Houses:","h"); entry->SetLineColor(1); entry->SetLineStyle(1); entry->SetLineWidth(1); entry->SetMarkerColor(1); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); entry->SetTextFont(62); entry=leg->AddEntry("FT","Fair Trade","l"); ci = TColor::GetColor("#996666"); entry->SetLineColor(ci); entry->SetLineStyle(1); entry->SetLineWidth(3); entry->SetMarkerColor(1); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); entry=leg->AddEntry("Bar","Barriques","l"); ci = TColor::GetColor("#0066cc"); entry->SetLineColor(ci); entry->SetLineStyle(1); entry->SetLineWidth(3); entry->SetMarkerColor(1); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); leg->Draw(); leg = new TLegend(0.2054598,0.6927966,0.5402299,0.7902542,NULL,"brNDC"); leg->SetTextFont(62); leg->SetLineColor(1); leg->SetLineStyle(1); leg->SetLineWidth(1); leg->SetFillColor(19); leg->SetFillStyle(1001); entry=leg->AddEntry("NULL","Local Coffee Houses:","h"); entry->SetLineColor(1); entry->SetLineStyle(1); entry->SetLineWidth(1); entry->SetMarkerColor(1); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); entry->SetTextFont(62); entry=leg->AddEntry("FT","Fair Trade","l"); ci = TColor::GetColor("#996666"); entry->SetLineColor(ci); entry->SetLineStyle(1); entry->SetLineWidth(3); entry->SetMarkerColor(1); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); entry=leg->AddEntry("Bar","Barriques","l"); ci = TColor::GetColor("#0066cc"); entry->SetLineColor(ci); entry->SetLineStyle(1); entry->SetLineWidth(3); entry->SetMarkerColor(1); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); leg->Draw(); leg = new TLegend(0.2025862,0.684322,0.5689655,0.8050847,NULL,"brNDC"); leg->SetTextFont(62); leg->SetLineColor(1); leg->SetLineStyle(1); leg->SetLineWidth(1); leg->SetFillColor(19); leg->SetFillStyle(1001); entry=leg->AddEntry("NULL","Local Coffee Houses:","h"); entry->SetLineColor(1); entry->SetLineStyle(1); entry->SetLineWidth(1); entry->SetMarkerColor(1); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); entry->SetTextFont(62); entry=leg->AddEntry("FT","Fair Trade","l"); ci = TColor::GetColor("#996666"); entry->SetLineColor(ci); entry->SetLineStyle(1); entry->SetLineWidth(3); entry->SetMarkerColor(1); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); entry=leg->AddEntry("Bar","Barriques","l"); ci = TColor::GetColor("#0066cc"); entry->SetLineColor(ci); entry->SetLineStyle(1); entry->SetLineWidth(3); entry->SetMarkerColor(1); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); leg->Draw(); leg = new TLegend(0.112069,0.8495763,0.75,0.9745763,NULL,"brNDC"); leg->SetTextFont(62); leg->SetLineColor(1); leg->SetLineStyle(1); leg->SetLineWidth(1); leg->SetFillColor(19); leg->SetFillStyle(1001); entry=leg->AddEntry("NULL","Madison Coffee House Costs (2011)","h"); entry->SetLineColor(1); entry->SetLineStyle(1); entry->SetLineWidth(1); entry->SetMarkerColor(1); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); entry->SetTextFont(62); leg->Draw(); c1->Modified(); c1->cd(); c1->SetSelected(c1); }