1
$\begingroup$

I have this graphics. All I want is more place like a space or interval between labels and the ordinate azis. How could I do that?

Manipulate[
 Plot[{E^(-k t) , E^(-k t) (-1 + E^(k t)) + 0.1}, {t, 0, 10}, 
  PlotStyle -> {Red, Blue}, 
  PlotLabels -> {Style["u[t]", 16], Style["x(t)", 16]}, 
  AxesLabel -> {Style["t", Bold, 16], Style["x(t),u(t)", Bold, 16]}, 
  TicksStyle -> {{FontSize -> 16}, {FontSize -> 16}}], {k, 0, 2}]

Thanks! la

$\endgroup$
3
  • 3
    $\begingroup$ Try Style["x(t),u(t)\n", Bold, 16] $\endgroup$ Nov 22 '19 at 12:01
  • $\begingroup$ Great! Thanks a lot! $\endgroup$ Nov 22 '19 at 12:39
  • $\begingroup$ You're welcome, it's only a simple workaround. $\endgroup$ Nov 22 '19 at 13:27
4
$\begingroup$

Notice how much simpler the code can be if you were use the BaseStyle option to set the font size. Also, notice that the code below does not show the spacing problem you are experience. I am running V11.3.0 on MacOS 10.13.4 (High Sierra).

Manipulate[
  Plot[{E^(-k t), E^(-k t) (-1 + E^(k t)) + 0.1}, {t, 0, 10},
    BaseStyle -> {FontSize -> 16},
    PlotStyle -> {Red, Blue},
    PlotLabels -> {"u[t]", "x(t)"},
    AxesLabel -> {"t", "x(t), u(t)"}],
  {k, 0, 2, .1, Appearance -> "Labeled"}]

plot

$\endgroup$
1
  • $\begingroup$ Sadly, this is how it looks like on windows: imgur.com/GrWenvn.png . +1 for BaseStyle, that thing is pretty usefull. $\endgroup$
    – Markhaim
    Nov 25 '19 at 4:32
2
$\begingroup$

You can wrap your label inside Pane and specify FrameMargins for it.

Manipulate[
 Plot[
  {E^(-k t), E^(-k t) (-1 + E^(k t)) + 0.1}, {t, 0, 10}
  , PlotStyle -> {Red, Blue}
  , PlotLabels -> {Style["u[t]", 16], Style["x(t)", 16]}
  , AxesLabel -> {Style["t", Bold, 16], 
    Pane[Style["x(t),u(t)", Bold, 16], 
     FrameMargins -> {{0, 0}, {20, 0}}]}
  , TicksStyle -> {{FontSize -> 16}, {FontSize -> 16}}
  ]
 , {k, 0, 2}
 ]

enter image description here

$\endgroup$

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.