Re: TColor settings are lost in EPS

From: Rene Brun <Rene.Brun_at_cern.ch>
Date: Tue, 18 Sep 2007 17:03:05 +0200


In your script, replace the line

    TColor color(10000+i, (double)i/(kN-1), 0, 1-(double)i/(kN-1)); by

    TColor *color = new TColor(10000+i, (double)i/(kN-1), 0, 1-(double)i/(kN-1));

otherwise the TColor object does not exist anymore when you leave the loop.

Rene Brun

OKUMURA, Akira wrote:
> Hello ROOTers,
>
> I compiled a short macro with ROOT 5.16 on OS X 10.4 (PPC) but its
> canvas was not saved as EPS correctly. All of colored lines are
> changed to white in output EPS. It ran correctly half year ago maybe
> with ROOT 5.15 or 5.14.
>
> Please run the attached macro and save the canvas from menu (can.eps).
>
> If I save the canvas as GIF format, it works good.
>
> How should I change the macro?
>
> Sincerely
>
> OKUMURA, Akira oxon_at_icrr.u-tokyo.ac.jp
> Institute for Cosmic Ray Research, University of Tokyo
> 5-1-5 Kashiwanoha Kashiwa Chiba 277-8582 Japan
> Phone/Fax : +81 4-7136-3153
> Skype : okumura.akira
>
> ------------------------------------------------------------------------
>
Received on Tue Sep 18 2007 - 17:03:26 CEST

This archive was generated by hypermail 2.2.0 : Tue Sep 18 2007 - 23:50:02 CEST