GeoGebra의 코드

GeoGebra의 코드

GeoGebra에서 그림을 만들고 해당 코드를 Overleaf로 내보낸 다음 컴파일했지만 PDF 편집도 표시되지 않습니다. 코드는 다음과 같습니다.

\documentclass[10pt]{article}
\usepackage{pgfplots}
\pgfplotsset{compat=1.15}
\usepackage{mathrsfs}
\usetikzlibrary{arrows}
\pagestyle{empty}
\begin{document}
\definecolor{zzttqq}{rgb}{0.6,0.2,0.}
\definecolor{ududff}{rgb}{0.30196078431372547,0.30196078431372547,1.}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
\clip(1.,-2.) rectangle (7.,2.5);
\fill[line width=2.pt,color=zzttqq,fill=zzttqq,fill opacity=0.10000000149011612] (3.5529849861247715,1.6224751896453264) -- (2.1080515726119877,-0.9010704902924921) -- (6.208813302510944,-1.1452845883509906) -- cycle;
\draw [line width=2.pt,color=zzttqq] (3.5529849861247715,1.6224751896453264)-- (2.1080515726119877,-0.9010704902924921);
\draw [line width=2.pt,color=zzttqq] (2.1080515726119877,-0.9010704902924921)-- (6.208813302510944,-1.1452845883509906);
\draw [line width=2.pt,color=zzttqq] (6.208813302510944,-1.1452845883509906)-- (3.5529849861247715,1.6224751896453264);
\begin{scriptsize}
\draw [fill=ududff] (3.5529849861247715,1.6224751896453264) circle (2.5pt);
\draw[color=ududff] (4.16860802498057,1.8361625254465128) node {$$\scalebox{1.5} {x_2}$$};
\draw [fill=ududff] (2.1080515726119877,-0.9010704902924921) circle (2.5pt);
\draw[color=ududff] (2.2657731776081014,-1.0028263644835331) node {$$\scalebox{2}{x_1}$$};
\draw [fill=ududff] (6.208813302510944,-1.1452845883509906) circle (2.5pt);
\end{scriptsize}
\end{tikzpicture}
\end{document}

답변1

Geogebra는 나쁜 Ti를 생산합니다케이Z 코드를 편집해야 합니다.

가장 먼저 해야 할 일은 항상 \clip명령과 scriptsize의사 환경을 제거하는 것입니다.

또한 $$\scalebox{2}{x_2}$$잘못되었으므로 수정해야 합니다.

터무니없는 정확도는 소수점 이하 두 자리까지 줄이는 것이 좋으며 라벨의 위치는 수정되어야 합니다.

\documentclass[10pt]{article}
\usepackage{tikz}
\usetikzlibrary{arrows}
\pagestyle{empty}

\begin{document}

\definecolor{zzttqq}{rgb}{0.6,0.2,0}
\definecolor{ududff}{rgb}{0.3,0.3,1}

\begin{tikzpicture}[line cap=round,line join=round]
\fill[
  line width=2pt,
  color=zzttqq,
  fill=zzttqq,
  fill opacity=0.1
] (3.55,1.62) -- (2.11,-0.9) -- (6.21,-1.15) -- cycle;
\draw [line width=2pt,color=zzttqq] (3.55,1.62)-- (2.11,-0.9);
\draw [line width=2pt,color=zzttqq] (2.11,-0.9)-- (6.21,-1.15);
\draw [line width=2pt,color=zzttqq] (6.21,-1.15)-- (3.55,1.62);
\draw [fill=ududff] (3.55,1.62) circle (2.5pt);
\draw[color=ududff] (3.55,1.9) node {$x_2$};
\draw [fill=ududff] (2.11,-0.9) circle (2.5pt);
\draw[color=ududff] (2.11,-1.2) node {$x_1$};
\draw [fill=ududff] (6.21,-1.15) circle (2.5pt);
\end{tikzpicture}

\end{document}

여기에 이미지 설명을 입력하세요

답변2

이것은 주제에서 벗어난 것일 수도 있지만 여기서 GeoGebra를 사용하면 어떤 이점이 있는지 모르겠습니다. 꼭지점의 스타일을 정의한 다음 하나의 명령으로 삼각형을 그리고 채우고 꼭지점에 노드로 레이블을 지정하면 됩니다 \draw.

여기에 이미지 설명을 입력하세요

\documentclass{article}
\usepackage{tikz}

\begin{document}

\definecolor{zzttqq}{rgb}{0.6,0.2,0}
\definecolor{ududff}{rgb}{0.3,0.3,1}

\tikzset{vertex/.style={circle, inner sep=1.7pt, outer sep=0, fill=ududff, draw=black, thin, label={[ududff]#1}}}

\begin{tikzpicture}
\draw [line width=2pt, color=zzttqq, fill=zzttqq!20] (3.55,1.62)node[vertex=above:$x_2$]{}
    -- (2.11,-0.9)node[vertex=below:$x_1$]{} -- (6.21,-1.15)node[vertex]{} -- cycle;
\end{tikzpicture}

\end{document}

답변3

라인에 문제가 있습니다

\draw[color=ududff] (4.16860802498057,1.8361625254465128) node {$$\scalebox{1.5} {x_2}$$};

그리고

\draw[color=ududff] (2.2657731776081014,-1.0028263644835331) node {$$\scalebox{2}{x_1}$$};

다음으로 교체하세요.

\draw[color=ududff] (4.16860802498057,1.8361625254465128) node {\scalebox{1.5}{$x_2$}};

그리고

\draw[color=ududff] (2.2657731776081014,-1.0028263644835331) node {\scalebox{2}{$x_1$}};

각기.

관련 정보