Applying a scale option to a TikZ picture works great. It keeps the text the proper size and scales everything else. I would like to have the same behavior when using a \begin{axis}...\end{axis}
.
Consider the following in which the first graphic does not use the {axis}
environment. Changing the scale works great. However, try changing the scale option of the second \begin{tikzpicture}
to scale=1.5
. This has the effect that the x and y axis labels are moved far away form the axis.
Furthermore, I can see no apparent change in the scale option applied to \begin{axis}
. I don't see any error messages complaining about it, so it must be a valid option.
\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}[scale=1.0]
\draw [->][gray, thin](-3,0) -- (3,0)
node[blue, right] {$x$};
\draw [->][gray, thin] (0,-3) -- (0,3)
node[blue, above] {$y$};
\end{tikzpicture}
\begin{tikzpicture}[scale=1.0]
\begin{axis}[scale=1.5 % Has no effect
minor tick num=0,
axis y line=center,
axis x line=middle,
xmin=-3,
xmax=3,
ymin=-3,
ymax=3,
xlabel=$x$,
ylabel=$y$
]
\end{axis}
\end{tikzpicture}
\end{document}
Also, one other minor nit-pick now that I posted this: How do I got about getting the x,y labels within {axis}
to be to the right and on top as in the first example?
width
andheight
(or the development version'sscale
option). If the question is "How do I scale atikzpicture
which, among other things, contains a PGFplots axis, while keeping line widths and font sizes", then the answer is: You can't; theaxis
environment is jus too complex for this.scale
adjustment - I referenced this question in case the problem is related.