You can wrap your label with another Framed
with the options FrameStyle -> None
and FrameMargins -> {{0, rightmargin}, {0,0}}
with your choice of rightmargin
:
Plot[1/(1 + Exp[-x]), {x, -10, 10},
PlotLabel -> Framed[Framed[Pane[HoldForm[F[x] = 1/(1 + E^-x)],
Alignment -> Right]],
FrameStyle -> None, FrameMargins -> {{0, Scaled[.1]}, {0, 0}}]]
Use FrameMargins -> {{0, Scaled[.14]}, {0, Scaled[.05]}}
to get
Update: An alternative way is to put the label in a dynamic, movable Epilog
:
DynamicModule[{pt = Scaled[{.5, 1}]},
Plot[1/(1 + Exp[-x]), {x, -10, 10},
ImagePadding -> {{Automatic, Automatic}, {Automatic, Scaled[.05]}},
PlotRangeClipping -> False,
Epilog -> Dynamic[Locator[Dynamic[pt],
Panel[HoldForm[F[x] = 1/(1 + E^-x)]],
Background -> White, LocatorRegion -> Full]]]]