1
$\begingroup$

I'm using FrameTicks and Frame to get a second y-axis. But then my axes labels disappear. I've solved it by using Framelabel instead, but was wondering why this happens, and if there is a solution where you can still use AxisLabel?

The labels show up in the first plot, but not in the second one.

F[x_] := 2 x

Plot[{F[x]}, {x, 1, 100}, 
  AxesLabel -> {HoldForm[Subscript["R", \[Null] "⊥,max" \[Null]] [cm] ]} ]

Plot[{F[x]}, {x, 1, 100}, 
  Frame -> {{True, True}, {True, True}}, 
  FrameTicks -> {{All, All}, {All, None}}, 
  AxesLabel -> {t, HoldForm[Subscript["R", \[Null] "⊥,max" \[Null]] [cm] ]} ]
$\endgroup$
4
$\begingroup$

Use PlotRangePadding to make enough room in the plot for the axes to appear.

Plot[2 x, {x, 1, 100},
  Frame -> True,
  FrameTicks -> {{All, All}, {All, None}},
  PlotRangePadding ->
    {{Scaled[.11], Automatic}, {Scaled[.1], Automatic}},
  AxesLabel -> {HoldForm[Subscript["R", "⊥,max"][cm]], t}]

plot

$\endgroup$
  • $\begingroup$ Maybe he wanted the labels the other way around, but the general idea works anyway (+1). $\endgroup$ – Jens Jul 24 '15 at 19:21
  • $\begingroup$ @Jens. It's hard to say. The unframed plot has the HoldForm[Subscript["R", "\[UpTee],max"][cm]] label along the x-axis. I thought it best to retain that, so I put t on the y-axis. $\endgroup$ – m_goldberg Jul 24 '15 at 19:25
  • $\begingroup$ Indeed, you're probably right. $\endgroup$ – Jens Jul 24 '15 at 19:27

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.