I am plotting a function and for labeling the axes I use:

AxesLabel -> {Style[y, FontSize -> 21], Style[{Subscript[f, i], Subscript[q, i]}, FontSize -> 21]}

here $y$ is for the $x$-axis and $\{f_i,q_i\}$ is for the $y$-axis. The problem is that I dont want to have $\{\}$. I only want to have $f_i,q_i$ at the $y$-axis. How can I manage this?

Thank you very much.

  • 1
    $\begingroup$ Just use a string for the Y label: Style["\!\(\*SubscriptBox[\(f\), \(6\)]\),\!\(\*SubscriptBox[\(q\), \ \(6\)]\)", FontSize -> 21] (use ctrl-_ to enter the subscript in the string, then just Style the string to desired font size) $\endgroup$
    – ciao
    May 18 '14 at 0:42
  • $\begingroup$ @rasher thanks for a quick reply. It works well, pls put as an answer. $\endgroup$ May 18 '14 at 0:53
  • $\begingroup$ Glad that helped. Will post as answer as requested, but be advised Q will probably get closed as an "...in the docs..." kind of thing. $\endgroup$
    – ciao
    May 18 '14 at 1:09

Use a string for the Y-axis label, e.g.:

AxesLabel -> 
 {Style[y, FontSize -> 21], 
  Style["\!\(\*SubscriptBox[\(f\), \(6\)]\),\!\(\*SubscriptBox[\(q\), \ \(6\)]\)", 
    FontSize -> 21]}

You can use the key combination of Ctrl+_ to enter subscripts directly into the string, then use Style on the string to alter font size, etc.


Here's a (mostly) non-string approach, using Row to string expressions together:

 AxesLabel -> {Style[y, FontSize -> 21], 
               Style[Row[{Subscript[f, i], Subscript[q, i]}, ","], FontSize -> 21]}]

You can also use StringForm:

Plot[x, {x, 0, 1}, AxesLabel ->
    (Style[#, 21] & /@ {y, StringForm["`1`,`2`", Subscript[f, 6], Subscript[q, 5]]})]

enter image description here


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.