Group Abstract Group Abstract

Message Boards Message Boards

0
|
2.2K Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Issue with ticks of axis display in Plot[ ]?

Posted 3 years ago

Hello everyone! I'm new to Mathematica, and I have trouble with the display of the following plot:

p1 = Plot[{(9.64* x^3 (4 - 9 x + 6 x^2 - x^3))/10^5, (
   9.64* (4 x^3 - 9 x^2 + 6 x - 1))/10^5}, {x, 0, 1.3}, 
  PlotRange -> {0, 4.717*10^-5}, PlotLegends -> {k11, k22}, 
  Frame -> True, 
  FrameLabel -> {Style["Coordonnées généralisées", Black, 14], 
    Style["Coefficients d'influence", Black, 14]}, 
  FrameTicks -> {Automatic, {#, ScientificForm@#} & /@ 
     Range[0., 4.7*10^-5, 10^-5.]}, FrameTicksStyle -> {Black, 1}, 
  GridLines -> Automatic]

Because I'm not yet familiar with Mathematica, I picked up from various sources bits of code to plot the function. My main concern was displaying the y-axis using a scientific notation, which worked. However, I realise that the x-axis doesn't display any ticks (at least, it doesn't show for me). I have tried for a few days to sort it out, without any success. I am really sorry in advance if the solution to my issue is trivial. As I said, I'm not sure I understand every aspect of the code. Thanks a lot!

Attachment

Attachments:
POSTED BY: Tamara Dejardin
2 Replies

Tamara,

the problem is caused by the option FrameTicksStyle -> {Black, 1}, i.e. try it without this option:

p1 = Plot[{(9.64*x^3 (4 - 9 x + 6 x^2 - x^3))/10^5, (9.64*(4 x^3 - 9 x^2 + 6 x - 1))/10^5}, {x, 0, 1.3}, 
  PlotRange -> {0, 4.717*10^-5}, PlotLegends -> {"k11", "k22"}, 
  Frame -> True, FrameLabel -> {Style["Coordonnées généralisées", Black, 14], 
    Style["Coefficients d'influence", Black, 14]}, 
  FrameTicks -> {Automatic, {#, ScientificForm@#} & /@ Range[0., 4.7*10^-5, 10^-5.]}, 
  GridLines -> Automatic]

Addendum:

OK, if you really need black frameticks, then use e.g.: FrameTicksStyle -> {Black, 10}

POSTED BY: Henrik Schachner

Thank you so very much, it works perfectly now. I have indeed just realised, thanks to your help, that this was an issue with the font size. I will remember that!

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