Message Boards Message Boards

0
|
1375 Views
|
2 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Have Plot print polynomial frame labels with highest coefficient first

Posted 1 year ago

Is there a way to have a polynomial FrameLabel print highest coefficient first? Typically polynomials are printed with lowest order terms first. TraditionalForm is generally used to print polynomials with highest order term first as one usual sees in print. For example:

In[1]:= x^3 + x + -5

Out[1]= -5 + x + x^3

In[2]:= TraditionalForm[x^3 + x - 5]

Out[2]//TraditionalForm= x^3+x-5

Plotting the example polynomial and using it as a FrameLabel reverts to lowest order coefficient first. Plot[x^3 + x + -5, {x, -3, 3}, Frame -> True, FrameLabel -> {{None, None}, {None, TraditionalForm[x^3 + x - 5]}}] Produces: enter image description here

POSTED BY: Chuck DeCarlucci
2 Replies

Try

ToString@TraditionalForm[x^3 + x - 5]

If you want more control take a look at the MaTeX package.

POSTED BY: Rohit Namjoshi

Thanks, using ToString works with FrameLabel and resolves my issue.

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

Group Abstract Group Abstract