Group Abstract Group Abstract

Message Boards Message Boards

Edit appearance of the text in axis label for an XY plot?

Posted 10 years ago

The following piece of code is intended to label the x-axis " ln <R(t)> " and the y-axis " ln p'(t) ". This plot will go in a paper that I'll submit for publication, so it needs to look nice. My problem is that the y-axis label appears as " ln (t)p' " rather than " ln p'(t) ". How do I fix that????? Thanks!

FrameLabel -> {"ln " AngleBracket[Style["R(t)", Italic]], 
  "ln " Superscript[Style["p", Italic], \[Prime]] Style["(t)", 
    Italic]}
POSTED BY: Clint Van Siclen
4 Replies

You are welcome! You can try this:

Plot[10 Sin[t] + t^2, {t, -10, 10}, Frame -> True, 
 FrameLabel -> {"ln " Style["R(t)", Italic], 
   "ln " Style["p'(t)", Italic]}, LabelStyle -> Directive[Italic]]

Thank you for your reply! As I am preparing the plot for publication, I specify that the font is " Times ". When I use your suggested solution " Style["p'(t)",Italic] ", the result is good except that the prime is upright instead of slanted.

POSTED BY: Clint Van Siclen
Plot[10 Sin[t] + t^2, {t, -10, 10}, Frame -> True, 
 FrameLabel -> {"ln " Style["R(t)", Italic], 
   "ln " Style["p'(t)", Italic]}]

enter image description here

Plot[10 Sin[t] + t^2, {t, -10, 10}, Frame -> True, 
 FrameLabel -> {"In " Style["R(t)", Italic], 
   "In " Style["p'(t)", Italic]}]

enter image description here

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard