I want to replicate some graphs that I drew by hand on millimeter paper. Here is a picture:
My current code is as follows (I didn't worry about the data yet):
\documentclass{report}
\usepackage{pgfplots}
\usepackage{siunitx}
\begin{document}
\begin{tikzpicture}[scale = 2]
\begin{axis}[
axis lines = middle,
xlabel = t\lbrack\si{\second}\rbrack,
ylabel = x\lbrack\si{\metre}\rbrack,
x label style = {anchor = north west, font = \scriptsize},
y label style = {anchor = north east, font = \scriptsize, shift={(0,0.5cm)}},
xtick = {0,10,...,20},
minor xtick = {1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19},
ytick = {0,10,...,20},
minor ytick = {1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19},
tick style = {line width = 0.3pt},
ticklabel style = {font = \tiny, fill = white},
axis line style = {-latex},
grid = both,
ymin = 0,
ymax = 21,
xmin = 0,
xmax = 21,
]
\addplot[
only marks,
mark size = 2,
black,
error bars/.cd,
y dir = both,
x dir = both,
y explicit,
x explicit
]
%table[x= temp, y = temp, x error = temp, y error = temo]
%{\datafile};
coordinates {(6.4,7.2) +-(1,0.5)};
\end{axis}
\end{tikzpicture}
\end{document}
(Note that I used dummy values, coordinates, sc and variables; they aren't important right now).
By setting the major and minor grid style I was able to get thick lines on my labeled coordinates and thin lines in between:
\pgfplotsset{minor grid style = {line width = 0.1pt}}
\pgfplotsset{major grid style = {line width = 0.4pt}}
But this is where I get stuck. There are several things that I'm not able to do by going this route:
I need major grid lines every centimeter, independent of the label.
On millimeter paper there are 3 grids; besides the major one with 1cm spacing and the minor one with 1mm spacing, there is a third one every 5mm (with a thickness somewhere between the 2 grids). Using pgfplots I am only able to edit the major and minor grid styles, but I can't seem to find a way to add further grids to a certain graph.
Display the plot in "landscape mode" so that it takes up the whole page, as shown in the picture.
I'd appreciate it if somebody could help me out with those issues.
Thanks!


