0
$\begingroup$

I am struggling with AxesLabel for a plot. I want to label the axis with a variable name and a unit; where the variable is italicized and the unit keeps using a plain font.

To demonstrate, I would like to generate A [1/m] using the command:

AxesLabel -> { Style[ "A", Italic, 16] Style[ "[1/m]", 16] }

but it returns [1/m] *A*.

$\endgroup$
3
  • 2
    $\begingroup$ Try: AxesLabel -> {RowBox[{Style["A", Italic, 16] , " ", Style["[1/m]", 16]} ] // DisplayForm, TraditionalForm[y[x]]} $\endgroup$
    – Syed
    Apr 27 at 14:01
  • $\begingroup$ it works! Thank you! :) $\endgroup$
    – blahblah
    Apr 28 at 8:41
  • $\begingroup$ In such cases, I do the following: AxesLabel -> { Row[{Style[ "A", Italic, 16], Style[ "[1/m]", 16]}] } . Try it. $\endgroup$ Apr 28 at 11:08

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.