I am trying to resize the following figure. I have produced for one document. Now I want to re-use the code in another document, but I need to make the figure smaller. I have tried many re-sizing commands and even using minipage (in different parts of the code), but nothing worked. I really appreciate your help.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{pgf,tikz}
\usetikzlibrary{positioning,calc,chains,fit,shapes,arrows}
\begin{document}
\begin{figure}
\begin{center}
\definecolor{xdxdff}{rgb}{0.49019607843137253,0.49019607843137253,1}
\definecolor{ududff}{rgb}{0.30196078431372547,0.30196078431372547,1}
\definecolor{cqcqcq}{rgb}{0.7529411764705882,0.7529411764705882,0.7529411764705882}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1cm,y=1cm]
\draw [color=cqcqcq,, xstep=1cm,ystep=1cm] (-1.52,-1.25) grid (7.52,7.25);
\clip(-1.52,-1.25) rectangle (6.52,6.25);
\draw [line width=2pt] (3,3) circle (2.8cm);
\draw [->,line width=2pt] (3,3) -- (5.669424238929763,3.845088298708634);
\draw (3.58,4.02) node[anchor=north west] {$\sqrt n$};
\draw (1,6) node[anchor=north west] {$C$};
\draw[thick,->] (-1,3) -- (6.5,3) node[anchor=north west] {};
\draw[thick,->] (3,-1) -- (3,6.2) node[anchor=south east] {};
\begin{scriptsize}
\draw [fill=ududff] (3,3) circle (2.5pt);
\draw [fill=xdxdff] (5.669424238929763,3.845088298708634) circle (2.5pt);
\end{scriptsize}
\end{tikzpicture}
\end{center}
\end{figure}
\end{document}
\resizebox
and\scalebox
commands that are provided by thegraphicx
package?x=…
andy=…
options to adapt the figure to the size I want, but here, I note a mix of numbers with an without units in your code, so changing thex
andy
values would probably break your figure. But if you clean that up first, it may be the way to go.