# [Tex/LaTex] Need help to export tikz code from geogebra

geogebratikz-pgf

I try to draw Images in Geogebra and export its code but when I use that codes images are too large on pdf. I want to make them small so that they fit in pdf in the standard manner

Please give me a suggestion. I am a beginner I want to learn tikz so please suggest me from where I can start.

First of all, I don't think using Geogebra is useful to learn TikZ. Geogebra is useful for making drawings and exporting them to LaTeX, its drawback is that the code is overloaded with useless stuff: precisely defined colors when you need only black and white, dots have coordinates with lots of numbers after the decimal point and that does not bring much, etc.. So, first, you have to clean geogebra of everything that won't be useful: remove the grid, the axes, the colors, etc.. Otherwise, it will still be possible to clean the tikz code.

I reproduced your drawing with geogebra, I got this:

To import a geogebra file, you must check the grid dimensions and adjust them so that they fit into your PDF sheet, usually A4 size. When you import it, this window appears:

The dimensions of the figure are shown on the right and are obviously too large for A4 paper.

You just have to modify the units to reduce its size:

If this exceeds, it is possible to reduce via tikz for example to half with scale=.5 or to quarter with scale=.25.

The code exported by geogebra is the following:

\documentclass[10pt]{article}
\usepackage{pgf,tikz,pgfplots}
\pgfplotsset{compat=1.15}
\usepackage{mathrsfs}
\usetikzlibrary{arrows}
\pagestyle{empty}
\begin{document}
\definecolor{xdxdff}{rgb}{0.49019607843137253,0.49019607843137253,1.}
\definecolor{ududff}{rgb}{0.30196078431372547,0.30196078431372547,1.}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=0.5cm,y=0.5cm]
\begin{axis}[
x=0.5cm,y=0.5cm,
axis lines=middle,
ymajorgrids=true,
xmajorgrids=true,
xmin=-15.842434259954937,
xmax=5.975747558226897,
ymin=-3.7845379413974425,
ymax=13.585860255447013,
xtick={-15.0,-14.0,...,5.0},
ytick={-3.0,-2.0,...,13.0},]
\clip(-15.842434259954937,-3.7845379413974425) rectangle (5.975747558226897,13.585860255447013);
\draw [line width=2.pt] (-6.,5.) circle (3.905124837953328cm);
\draw [line width=2.pt] (-6.,5.) circle (1.5cm);
\begin{scriptsize}
\draw [fill=ududff] (-6.,5.) circle (2.5pt);
\draw[color=ududff] (-5.895026296018041,5.28383170548459) node {$A$};
\draw [fill=xdxdff] (0.,0.) circle (2.5pt);
\draw[color=xdxdff] (0.10046581517655445,0.2800751314800882) node {$B$};
\draw [fill=ududff] (-3.,5.) circle (2.5pt);
\draw[color=ududff] (-2.8897670924117267,5.28383170548459) node {$C$};
\draw [fill=ududff] (2.,4.) circle (2.5pt);
\draw[color=ududff] (2.098963185574753,4.277069872276477) node {$D$};
\draw[color=black] (-9.861968444778373,11.474665664913582) node {$c$};
\draw[color=black] (-7.457761081893323,7.387513148009005) node {$d$};
\end{scriptsize}
\end{axis}
\end{tikzpicture}
\end{document}


With tikz, the code can be simpler:

\documentclass{article}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}[scale=.5]
\coordinate[label=above left:A] (A) at (-6,5);
\coordinate[label=below:B] (B) at (0,0);
\coordinate (C) at (-3,5);
\coordinate (D) at (2,4);
\fill[blue] (A) circle (2pt);
\fill[blue] (B) circle (2pt);
\fill[blue] (C) circle (2pt) node[below right]{C};
\fill[blue] (D) circle (2pt) node[below right]{D};