# SciDraw: How to left-align a FigLabel text?

In SciDraw, the following command

FigLabel[{0.2, 0.3}, "test"];


places the label "test" at x=0.2 and y=0.3 in the current plot. Now, by default the text is centered around this point. Is there a way to make it start at the given point?

The argument Position->{x,y} doesn't do anything.

I gave a more detailed description in this answer. Here's a summary:

To specify the alignment relative to the anchor point {x,y} in FigLabel[{x,y}, "label"], you can use either

FigLabel[Anchor[{x,y}, offset], "label"]


or

FigLabel[{x,y}, "label", TextOffset -> offset]


The offset value is similar to the third argument of Text and can take either a named specification such as Left or a scaled coordinate pair running in the range -1..1. Thus {-1,0} is equivalent to Left.

Relevant sections of the SciDraw manual:

• 8.1.8 Text positioning
• 7.1 Points and anchors
• 13 Annotations

@Felix: The only way I've found around this is using old-school Text[].

Quiet@Get["SciDraw"]


Define

tlg = Graphics@Text["Center", {5, 6}, {-1, 0}] (* left-j *);
trg = Graphics@Text["Center", {5, 6}, {+1, 0}] (* right-j *);


then

Figure[
FigurePanel[{
FigLabel[{5, 5}, "Center"],
FigGraphics@tlg,
FigGraphics@trg,
FigLine[{{5, 0}, {5, 10}}],
FigLine[{{0, 5}, {10, 5}}]
},
XPlotRange -> {0, 10},
YPlotRange -> {0, 10}
]
]


ScaledLabel (FigLabel in SciDraw) has been great for Single lines. Not so for multi-line text blocks where I want proper justification.

• Thanks, that is exactly what I needed! Just to add, to align MaTeX text, one can combine this approach with mathematica.stackexchange.com/questions/144091 to get tlg2 = Graphics[ Inset[MaTeX["\\text{Center}", Magnification -> .05], {5, 6}, {Left, Center}]];`. – Felix Jul 30 '17 at 16:48
• See my answer for a pure-SciDra way. – Szabolcs Aug 3 '17 at 9:28