TArrow size and position


I try to draw TArrows of same absolute size in TPads of basically the same size (the TCanvas is scaled with fixed pixel width/height for each pad). Since I need the pad coordinates (of the histograms) I didn’t switch to SetNDC.

However, it looks like that the TArrow tip is scaled only by the width of the underlying TCanvas, not by the actual size of the pad it’s drawn to (not sure whether the uploaded images will be shown in orignial size, so the width of the 2x1 canvas is the same as the 2x2, the 3x1 is 50% wider). In the three attached pictures the TArrow was drawn with the same command

arrow.DrawArrow(0.5, 0.5, 0.5, 0.5, 0.03, "|>");

and the tips of the arrows (with length 0) are much larger scaled in the 3x1 than in the 2x1 and 2x2 canvas.

Does anybody know how I can fix this?

Best regards and thanks,

Please read tips for efficient and successful posting and posting code

ROOT Version: 6.18/04
Platform: Linux
Compiler: Not Provided


As work-around I scaled the arrow size now by the relative canvas width, which looks like it works.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

Yes that’s the way to do it. The TArrow head is drawn with as a line or a polygon. It is not a marker. So it follows the pad scaling.