Re: TAxis : move it

From: Rene Brun <Rene.Brun_at_cern.ch>
Date: Fri, 23 Oct 2009 18:24:55 +0200


The axis is always drawn at the origin of the coordinates or 0 in case -+. Create a TGaxis and place it where you want. See $ROOTSYS/tutorials/graphics/gaxis.C

Rene Brun

Marc Escalier wrote:
> Hello,
>
> Would somebody know how to move the X and Y axis ? i mean for
> example, make the axis be at y=3, and x axis at 0.5 (just a minimal
> dummy example)
>
> TCanvas *mycanvas_test=new TCanvas("mycanvas_test","mycanvas_test");
> TF1 myfunction("myfunction","x*x",-1.5,1.5);
> myfunction.Draw();
>
> i mean : one can get TAxis *axis_x=myfunction->GetXaxis(), but then
> how to move it ?
>
> thanks
>
> ===========
> Marc Escalier a écrit :
>> Hello,
>>
>> From a TProfile, we see the distribution of
>> Y (with errors due to distributions) as a function of X
>>
>> How to transform it to draw :
>> -same in X axis
>> -in the Y axis : rms of the Y instead of "Y mean value with his
>> errors" ?
>>
>> thank you
>>
>>
>
Received on Fri Oct 23 2009 - 18:25:01 CEST

This archive was generated by hypermail 2.2.0 : Fri Oct 23 2009 - 23:50:02 CEST