Incorporating GeoGebra graphs into LaTeX
This is provided by Dave Rumsey, a PhD student at BGSU.
The best description of how to do it can be found here.
https://prep11geogebra.pbworks.com/w/page/38586775/LaTex%20with%20GeoGebra
It is not perfect all the time but for most simple graphs it works beautifully. It has been great for me in my Calc classes when doing graphical limits. Get the power of the Latex typesetting and don't have
to worry about importing images. Also, the graphs generated with tikz are can be zoomed in on with no distortion.
The one bug that I have noticed that the above site does not discuss is when graphing trig functions. The code generated needs to have one modification in it.
Geogebra gives this line for sin(4x) with domain -4.0 to 4.0. Tikz default is in degrees.
\draw[smooth,samples=100,domain=-4.0:4.0] plot(\x,{4*sin(\x )});
If you simply put and r after the \x (shown below) it will plot in radians instead
\draw[smooth,samples=100,domain=-4.0:4.0] plot(\x,{4*sin(\x r)});
The other option that is not generally implemented in the export is a scaling feature. This can be manually entered in to scale the picture up or down to fit better in the document. Original code is the following
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
New code would be (This would reduce size by 1/2).
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm, scale = 0.5]