I have the following code to create an axis on which trigonometric functions must be plotted (in degrees). It is to be printed out and used as part of a mathematics test paper. However, x axis must be in step sizes of 30 degrees.
How can I modify the code below that each label on my x-axis, is multiplied by 30? I.e. the labels must be 0; 30; 60; 90; 120; ... etc
\documentclass[paper=a4, fontsize=11pt]{scrartcl}
\usepackage{tikz}
\usepackage{amsmath,amsfonts,amsthm}
\usepackage{gensymb}
\begin{document}
\begin{tikzpicture}
\draw[step = 0.5 cm, gray, very thin] (-1, -4) grid ( 13, 4);
\draw[thick, ->] (-1,0) -- (13,0) node[anchor = north west] {$x$};
\draw[thick, ->] (0,-4) -- (0,4) node[anchor = south east] {$y$};
\foreach \x in {1,...,13}
\draw (\x cm, 1pt) -- (\x cm, -1pt) node[anchor = north] {$\x \degree$};
\foreach \y in {-3,..., 3}
\draw (1pt, \y cm) -- (-1pt, \y cm) node[anchor = east] {$\y$};
\end{tikzpicture}
\end{document}





cminside coordinate specification if you want to refer to the PGF coordinate system (with dimensions you access the paper coordinate system). See thexand theykey in the PGF/TikZ manual. (The default isx=1cmandy=1cm). That being said, you can also use\draw[x=1cm/30] \foreach \x in {30,60,...,360} {(\x, 1pt) -- (\x, -1pt) node[anchor = north] {$\x \degree$}};. (I moved the\foreachinside the path so that the calculation and transformation ofx=1cm/30is only done once.) – Qrrbrbirlbel May 03 '15 at 21:47