Plot[Sin[x], {x, 0, Pi}, PlotTheme -> "Scientific", 
FrameLabel -> {"x (rad)", "Signal (%)"}, 
BaseStyle -> {FontSize -> 25, FontFamily -> "Latin Modern Math"}]

enter image description here How can I use two kinds of the font in FrameLabel at the same time?

Like, I want to let "(%)" in "Latin Modern Math" but others are in Times.


Edit: In principle the simplest answer is the same as this one: use the Show Fonts menu. However, that menu item is grayed out in Mathematica version 11.0.1 on macOS Sierra. The following is a workaround for that bug. End Edit

To make the desired adjustments interactively, select the % in your source code, then go to the menu Format > Option Inspector. It will open a pane that shows all the things you can modify for the current selection. Among them is Formatting Options > Font Options > FontFamily which you can now adjust using the drop-down menu.

screen shot

Once you press shift-enter, the label as you formatted it will be preserved because it's already wrapped in a StyleBox automatically, without you having to enter the code for it.

  • $\begingroup$ Thanks a lot, it's a very clear description :) $\endgroup$ – tablecircle Jul 14 '17 at 9:17
FrameLabel -> {"x (rad)", 
   {Text[Style["Signal", 24, FontFamily -> "Times"]], 
    Text[Style[" (%)", FontFamily -> "Latin Modern Math"]]}]}
  • $\begingroup$ Thanks! It works perfectly in some of my trivial and similar graphs! $\endgroup$ – tablecircle Jul 14 '17 at 9:20

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.