See the explanation at the end of:
http://root.cern.ch/drupal/content/how-use-postscript-interface
The "Warning" paragraph.
-----Original Message-----
From: owner-roottalk_at_root.cern.ch [mailto:owner-roottalk_at_root.cern.ch] On Behalf Of Pawan Kumar Netrakanti
Sent: Thursday, June 11, 2009 5:49 PM
To: roottalk (Mailing list discussing all aspects of the ROOT system.)
Subject: [ROOT] Problems with saving figures as eps
Hi,
I am trying to save my graphs in .eps format.
The problem is, the shaded error bands are not displayed
in .eps or ps format.
The error bands show up nicely in gif and other formats.
I am using root 5.22/00 on Linux.
//Sample code:
void test()
{
gStyle->SetPalette(1); gStyle->SetOptStat(1); gStyle->SetOptFit(1); gStyle->SetTitleFillColor(10); gStyle->SetTitleFontSize(0.08); gStyle->SetTitleBorderSize(1); gStyle->SetPadBorderMode(0); gStyle->SetTextFont(42);
//! for color index setting
Int_t ci;
Int_t ck;
ci = TColor::GetColor("#d8cebf");
ck = TColor::GetColor("#c4c3c3");
int n=5;
double x[5] = {0,1,2,3,4}; double y[5] = {10,11,12,13,14}; double ex[5] = {0.2,0.2,0.2,0.2,0.2}; double ey[5] = {5,5.5,6,6.5,7};
TGraphErrors *gr = new TGraphErrors(n,x,y,ex,ey);
gr->SetMarkerStyle(22); gr->SetMarkerColor(4); gr->SetMarkerSize(1.5); gr->SetFillColor(ci); gr->SetFillStyle(2302); gr->SetLineColor(4);
TCanvas *c = new TCanvas("c","",1);
c->cd();
gr->Draw("AP2");
c->SaveAs("test.eps");
}
Thanks
with best regards
Pawan
This archive was generated by hypermail 2.2.0 : Mon Jun 15 2009 - 11:50:02 CEST