Problems with saving figures as eps

From: Pawan Kumar Netrakanti <pawan_at_rcf.rhic.bnl.gov>
Date: Thu, 11 Jun 2009 11:48:42 -0400

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



Pawan Kumar Netrakanti
Room# 247
Physics Department, Purdue University
1396 Physics Building
West Lafayette,
IN - 47907-1396
Ph: 765-494-5538
Received on Thu Jun 11 2009 - 17:48:48 CEST

This archive was generated by hypermail 2.2.0 : Thu Jun 11 2009 - 23:50:01 CEST