{ //=========Macro generated from canvas: c1/c1 //========= (Fri Jun 17 14:37:38 2011) by ROOT version5.28/00c TCanvas *c1 = new TCanvas("c1", "c1",10,29,700,500); gROOT->SetEditHistograms(); c1->Range(-0.6875001,-1.474706,11.1875,17.28065); c1->SetBorderSize(2); c1->SetGridx(); c1->SetGridy(); c1->SetFrameFillColor(0); TF1 *FT = new TF1("FT","Madison Coffee Shop Coffee Price (2011)",0.5,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("Price U.S.D./[Cups]"); FT->Draw(""); TPaveText *pt = new TPaveText(0.00862069,0.934322,0.6508621,0.9957627,"blNDC"); pt->SetName("title"); pt->SetBorderSize(2); TText *text = pt->AddText("Madison Coffee Shop Coffee Price (2011)"); 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.1666667,0.720339,0.5014368,0.8177966,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.1666667,0.720339,0.5014368,0.8177966,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.1666667,0.720339,0.5014368,0.8177966,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.1666667,0.720339,0.5014368,0.8177966,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(); c1->Modified(); c1->cd(); c1->SetSelected(c1); }