# Setting the size of an image using tkz_fct

I'm working on our coding system which combines a number of software possibilities. Here is what I have thus far.

### TOPIC 1

\topic = Sullivan 10.2 easy: parabolas
|@|

### MODEL 1.1, QUESTION 1
\versions = 10
|@|
\code =
my $a = randint(-9,9,1,(0)); my$b = 4*$a; my$Xmin=-4*$a; my$Xmax=4*$a; my$Xstep=$a; my$Ymin=-4*$a; my$Ymax=4*$a; my$Ystep=$a; |@| \qutext=What is the focus of the parabola$x^2={#b}y? |@| \mode = point |@| \answer = (0,#a) |@| \soltext=Compare the equation $$x^2={#b}y$$ with the form $$x^2=4ay$$ and note that: \begin{align*} 4a&=#b\\ a&=#a \end{align*} The parabola having the formx^2=4ay$opens up or down, depending on the value of$a$. In this case,$a=#a$, so the focus is at the point$(0,#a)\$.
\begin{center}
\begin{tikzpicture}
\tkzInit[xmin=#Xmin,xmax=#Xmax,xstep=#Xstep,ymin=#Ymin,ymax=#Ymax,ystep=#Ystep]
\tkzGrid
\end{tikzpicture}
\end{center}
|@|
\endquestion|@|


As you can see near the bottom, I'm trying to use tkz_fct to draw a graph based on some of the perl settings in the \code section above. What I am having trouble with is the fact that the size of the final grid on screen will change with different values of a. I'd like to scale the picture so that it is 6cm by 6cm. Can you make any suggestions?

Thanks.

-
Still working on this? Perhaps tex.stackexchange.com/questions/6388/… can be of help. –  Torbjørn T. Jan 4 at 23:35