Re: [ROOT] printing a variable on canvas

From: Manoj Jha (Manoj.Jha@cern.ch)
Date: Mon Oct 11 2004 - 15:43:06 MEST


Hi Otto,
    Lot of thanks for prompt reply. It works. Have a nice day.

Thanks,
Manoj

Otto Schaile wrote:
> Hi Manoj,
> 
> add lines like this and beatify them a bit:
> 
> axis = new TGaxis (xmin,ymin,xmax,ymax,xmin,ymax,20);
> //axis->Draw();
> TText * text = new TText();
> text->SetTextAlign(21);
> text->SetTextSize(0.03);
> ...
> // in the loop:
> 
>        l = new TLine( x[j],y[j],x[j+1],y[j+1] );
>        Double_t len = x[j+3] - x[j];
>        text->DrawText(0.5 * (x[j+3] + x[j]), 
>                       (y[j+1]), Form("%lg", len));
> You may also set TextAngle etc.
> for details see:
> 
> http://root.cern.ch/root/html/TText.html
> 
> Cheers
> Otto
> 
> On Mon, 11 Oct 2004, Manoj Jha wrote:
> 
> 
>>Dear root developers,
>>   I have generated a plot (file attacheda as crystal.ps ) using root . I am
>>trying to print the dimensions of each boxes along its sides. The dimensions
>>of each boxes are different from each other. Is it possible to print the
>>dimensions along the sides of boxes in the root ? I am attaching the file that
>>I had used for generating the plot.
>>
>>Thanks in advance,
>>Manoj Jha
>>
> 
> 



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:09 MET