16
$\begingroup$

I want the numbers along the axis to be larger than the default value. Can this be done?

The reason I am asking is because I frequently make charts in Mathematica and use them in Word. I export the charts as bitmap files and then paste the images in Word. The default text size for the axis is too small to be as clearly legible as I would like them to be when the chart is in bitmap form.

My problem would be solved if

  • there is a better way to use Mathematica charts in Word
  • I can get larger text numbers along the axis of the chart .

As an example, the following gives a plot of $\sin(x)$. How do I make the numbers on the axis larger in size?

Plot[Sin[x], {x, 0, 22}, PlotLabel -> Style["sin(x)", FontSize -> 18],
    Background -> LightYellow]
$\endgroup$
2

1 Answer 1

12
$\begingroup$
Plot[Sin[x], {x, 0, 10}, TicksStyle -> Large]

enter image description here

For something not quite so big, use: Larger, or choose your own font size with:

Plot[Sin[x], {x, 0, 10}, TicksStyle -> Directive[FontSize -> 16]]

Edit: Further to @YvesKlett helpful comment, one can even choose different styles for the x and y axes:

Plot[Sin[x], {x, 0, 10}, TicksStyle -> {{FontSize -> 16, Orange}, {FontSize -> 22, Green}}]

enter image description here

$\endgroup$
1
  • 5
    $\begingroup$ The introduction to Directive might be even more instructive if used with two arguments, because for just one argument it works just as well without it. $\endgroup$
    – Yves Klett
    Apr 23, 2013 at 6:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.