1
$\begingroup$

I have the following plot:

    test1 = Plot[1000*Exp[-0.03*t], {t, 0, 1000}, 
  FrameLabel -> {None, 
    Style[Row[{Subsuperscript["N", "W", "Post"]}], FontSize -> 30, 
     Black]}, Frame -> True]

I am trying to change the frame label such that the letter "N" is sufficiently larger than its corresponding Subsuperscript. Is there any easy way to do this?

$\endgroup$
1
  • 3
    $\begingroup$ Have you seen ScriptSizeMultipliers? $\endgroup$
    – Michael E2
    May 14 at 14:43

1 Answer 1

4
$\begingroup$

You can style each element of the Subsuperscript independently:

Subsuperscript[
  Style[a, FontSize -> 20, FontColor -> Blue], 
  Style[b, FontSize -> 10, FontColor -> Red], 
  Style[c, FontSize -> 12, FontColor -> Gray]]

Edit to clarify usage as FrameLabel

Plot[1000*Exp[-0.03*t], {t, 0, 1000}, 
  FrameLabel -> {None, 
                 Subsuperscript[
                   Style["N", FontSize -> 35, FontColor -> Red, FontFamily -> "Alegreya SC"], 
                   Style["W", FontSize -> 10], 
                   Style["Post", FontSize -> 14, FontSlant -> Italic]]}, 
  Frame -> True]
$\endgroup$
3
  • $\begingroup$ For some reason, that did not work when I applied it to the frame label. Do you know why this might be? $\endgroup$
    – tardigrade
    May 14 at 14:43
  • $\begingroup$ I was able to adjust the size, color, and font-family of the FrameLabel. So, no, I don't know why it's not working for you. What version of Mathematica are you using? How exactly did you try it? I will say that in your original code the outer Style and the Row are unnecessary, but I don't think that would be the problem. $\endgroup$
    – lericr
    May 14 at 14:49
  • $\begingroup$ Thank you for your help! It works now. $\endgroup$
    – tardigrade
    May 14 at 20:46

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.