6
$\begingroup$

I'd like to align a FrameLabel right.

For example: Plot[L[z], {z, 0.32, 1}, PlotRange -> {All, All}, Frame -> True, GridLines -> Automatic, LabelStyle -> {Black, 19}, Axes -> False, FrameLabel -> {"Distance (nm)", "Potencial (Nm)"}]

enter image description here

In this case the plot will have FrameLabels aligned to the center.

$\endgroup$
3
$\begingroup$
Plot[Exp[z], {z, 0.32, 1},
 PlotRange -> {All, All},
 Frame -> True,
 GridLines -> Automatic,
 LabelStyle -> {Black, 19},
 Axes -> False,
 FrameLabel -> {
   Row[{Spacer@180, "Distance (nm)"}],
   Row[{Spacer@50, "Potencial  (Nm)"}]}]

enter image description here

$\endgroup$
  • $\begingroup$ Thank you, I like this because it alters less of my code. $\endgroup$ – A. Vieira Aug 7 '17 at 9:31
5
$\begingroup$

You could use Labeled outside of the Graphics object. For example:

Labeled[
    Graphics[{}, Frame->True], 
    {"vertical label", "horizontal label"},
    {{Left, Top}, {Bottom, Right}},
    RotateLabel -> True
]

enter image description here

$\endgroup$
  • $\begingroup$ Unrelated question: I was taken by the font in your labels; it looks very pleasant to me. A quick online font-matching brings up Ubuntu Mono as the best match. Is that what yours is? (+1, btw). $\endgroup$ – MarcoB Aug 4 '17 at 17:44
  • 1
    $\begingroup$ @MarcoB I think it's just the default font in 11.1, "Source Sans Pro". $\endgroup$ – Carl Woll Aug 4 '17 at 19:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.