I generated some pgf/tikz code with Geogebra with good result
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
\draw[->,color=black] (-6.72,0) -- (7.8,0);
\foreach \x in {-6,-4,-2,2,4,6}
\draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below] {\footnotesize $\x$};
\draw[->,color=black] (0,-3.75) -- (0,7.03);
\foreach \y in {-2,2,4,6}
\draw[shift={(0,\y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left] {\footnotesize $\y$};
\draw(3,-1) circle (2cm);
\fill [color=black] (-3,0) circle (1.5pt);
\draw [color=black] (-2.9,-0.26)-- ++(-1.5pt,-1.5pt) -- ++(3.0pt,3.0pt) ++(-3.0pt,0) -- ++(3.0pt,-3.0pt);
\end{tikzpicture}
On the other hand I draw a figure based on a coordinate file, works fine
\begin{tikzpicture}[]
\begin{axis}[axis x line=none, axis y line=none]
\addplot[smooth, color=black] file[]{coords.txt};
\end{axis}
\end{tikzpicture}
I can't seem to join this in one graph (same coordinate system). \addplot doesn't work without the axis environment and \draw produces a lot of errors and don't follow the same coordinates when put inside the axis environment.
I know there's some big gap in my understanding of pgf/tikz but how can the graphs be succesfully joined?
Best Answer
You can include the
axis
environment in thetikzpicture
generated by Geogebra. To align the coordinate systems, setanchor=origin
in theaxis
options, and choose the samex
andy
lengths: