Re: Problems with saving figures as eps

From: Pawan Kumar Netrakanti <pawan_at_rcf.rhic.bnl.gov>
Date: Mon, 15 Jun 2009 09:44:00 -0400


Hi Philip and Oliver

Thanks
Now it works with the change of fill style.

with regards
Pawan

Philip Rodrigues wrote:
> Er, so I didn't actually try the script originally, but now that I do,
> the error bands don't appear in any format. I noticed the line:
>
> gr->SetFillStyle(2302);
>
> When I replace 2302 with 3001 it works. What is fill style 2302?
>
> Regards,
> Philip
>
> Pawan Kumar Netrakanti wrote:
>> Hi Oliver and Philip
>>
>> I have incorporated the suggestions which you have pointed in
>> email.
>> The problem is still there. I have checked this with 'display' also and
>> the error bands are not coming.
>> I have tried to print the file and see whether it appears or not..
>> The results
>> is the same.. no bands.
>>
>> Thanks
>> with best regards
>> Pawan
>>
>>
>> Olivier Couet wrote:
>>> That's more or less what is said in the howto page I sent.
>>>
>>> -----Original Message-----
>>> From: Philip Rodrigues [mailto:philrod_at_gmail.com] Sent: Thursday,
>>> June 11, 2009 8:33 PM
>>> To: Olivier Couet
>>> Cc: pawan_at_rcf.rhic.bnl.gov; roottalk (Mailing list discussing all
>>> aspects of the ROOT system.)
>>> Subject: Re: [ROOT] Problems with saving figures as eps
>>>
>>> I spent far too long trying to work around this bug in ghostscript. In
>>> the end, the best solution I could find was to turn off graphics
>>> antialiasing while leaving text antialiasing turned on. I did this
>>> via the following
>>> line in ~/.gv:
>>>
>>> GV.gsX11AlphaDevice: -sDEVICE=x11 -dTextAlphaBits=4
>>> -dMaxBitmap=10000000 -
>>> dNOPLATFONTS
>>>
>>>
>>> Regards,
>>> Philip
>>>
>>> On Thursday 11 June 2009 16:50:55 Olivier Couet wrote:
>>>
>>>> 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
>>>>
>>>> **************************************************
>>>> Pawan Kumar Netrakanti
>>>> Room# 247
>>>> Physics Department, Purdue University
>>>> 1396 Physics Building
>>>> West Lafayette,
>>>> IN - 47907-1396
>>>> Ph: 765-494-5538
>>>> **************************************************
>>>>
>>>
>>>
>>>
>>
Received on Mon Jun 15 2009 - 15:44:08 CEST

This archive was generated by hypermail 2.2.0 : Mon Jun 15 2009 - 23:50:01 CEST