# Horizontal axis tick marks

I have a question about adjusting the number of horizontal tick marks on a 2D plot.

Example:

f[x_] := 4*Sin[4*x]

Plot[{f[x]}, {x, -10, 10}, Ticks -> {Table[Pi n, {n, -5, 5}]}]


Gives the following plot:

How would I go about adding more ticks so I could change the range (in terms of $\pi$) to fractional values of $\pi$?

Say $-\pi/10$ to $\pi/10$.

or...in increments of $\pi/2$....or $\pi/4$?

The Plot command I am using is one I found from the help because I couldn't figure out how to make the ticks in terms of $\pi$. I'm still learning some of the basics, but I'm quite stuck on changing the number of ticks.

• Take a look at Table[Pi n, {n, -5, 5}]. What does it output? What do you need to change to have multiples of Pi/2? Feb 11, 2014 at 17:40
• To be honest I don't know what it does. I thought it merely set the number of labels that show on the 'x-axis', but per your post, which I just did not think of, changing those values to -5/2 and 5/2 gives what I'm looking for. Is there an easier ay to accomplish this however?
– fiz
Feb 11, 2014 at 17:55
• Then please start by reading up on Table and understanding what it does and how to use it. Use the documentation. Table is one of the most fundamental constructs in Mathematica and it is quite easy to understand. Feb 11, 2014 at 17:58
• Yes, for sure. Up to now it had not come up, but I will look the documentation. Now, your having said that, I asked if there were any other ways to accomplish this task. Is this just one way of doing it, or the easiest? Insight?
– fiz
Feb 11, 2014 at 18:10
• Yes, it's the easiest. For more complex tick arrangements the CustomTicks package is easier, but not for simple ones like what you described. Feb 11, 2014 at 18:12

Plot[4*Sin[4*x], {x, -10, 10},