I made the following plot, and the numbers are print to close together. How can I scale the the y and x axis?
\begin{tikzpicture}
\begin{axis}[
axis y line=center,
axis x line=middle,
axis equal,
grid=both,
xmax=10,xmin=-10,
ymin=-10,ymax=10,
xlabel=$x$,ylabel=$y$,
xtick={-10,...,10},
ytick={-10,...,10},
]
\addplot coordinates{(-3,1) (6,-2)};
\end{axis}
\end{tikzpicture}
Best Answer
pgfplots
can adjust the distance between the tick labels as the width/height of the varies. Hence you can change the width (or height) of the plot by passingwidth = <dimen>
to the axis options:The pdf such generated can be included in the main document using
\includegraphics
. If you want a uniform width for all the graphs, add it to the\pgfplotsset
likeOn ther other hand, you can define a style like
and use it to maintain consistency:
Refer to section 4.10.2, page 248 of
pgfplots
manual for more details.