重新缩放 Geogebra 中的图片

重新缩放 Geogebra 中的图片

这是 Geogebra 的图片代码。但图片似乎有点大,我想知道如何重新缩放它?

\begin{figure}[!h]
\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(-2.,-6.) rectangle (16.,4.5);
\draw [rotate around={89.51650278911086:(2.4,-0.25)},line width=1.pt] (2.4,-0.25) ellipse (3.1703783728458483cm and 2.10570630122263cm);
\draw [rotate around={-89.3634064240355:(10.05,-0.34)},line width=1.pt] (10.05,-0.34) ellipse (3.8483942394897617cm and 2.742122940813918cm);
\draw [line width=1.pt] (2.42,2.12)-- (10.02,2.36);
\draw [line width=1.pt] (2.42,2.12)-- (10.08,-3.04);
\draw [line width=1.pt] (2.38,-2.62)-- (10.02,2.36);
\draw [line width=1.pt] (2.38,-2.62)-- (10.08,-3.04);
%\draw (2.18,-3.64) node[anchor=north west] {$X$};
\draw[color=black] (2.4,-4) node {\scalebox{2}{$X$}};
\draw[color=black] (10.1,-4.8) node {\scalebox{2}{$Y$}};

\draw [fill=ududff] (2.42,2.12) circle (2.5pt);
\draw[color=ududff] (2
,2.1) node {\scalebox{1.8}{$x_1$}};
\draw [fill=ududff] (2.38,-2.62) circle (2.5pt);
\draw[color=ududff] (1.9,-2.6) node {\scalebox{1.8}{$x_2$}};
\draw [fill=ududff] (10.02,2.36) circle (2.5pt);
\draw[color=ududff] (10.5,2.3) node {\scalebox{1.8}{$y_1$}};
\draw [fill=ududff] (10.08,-3.04) circle (2.5pt);
\draw[color=ududff] (10.5,-3.1) node {\scalebox{1.8}{$y_2$}};

\end{tikzpicture}

答案1

scale=<value between 0 and 1>您只需将其作为一个选项添加到您的tikzpicture环境中即可扩展它。

\documentclass{article}
\usepackage{tikz}

\begin{document}
\begin{figure}[!h]
\definecolor{ududff}{rgb}{0.30196078431372547,0.30196078431372547,1.}
\begin{tikzpicture}[
  line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm,
  scale=0.7]% <-- added scaling
\clip(-2.,-6.) rectangle (16.,4.5);
\draw [rotate around={89.51650278911086:(2.4,-0.25)},line width=1.pt] (2.4,-0.25) ellipse (3.1703783728458483cm and 2.10570630122263cm);
\draw [rotate around={-89.3634064240355:(10.05,-0.34)},line width=1.pt] (10.05,-0.34) ellipse (3.8483942394897617cm and 2.742122940813918cm);
\draw [line width=1.pt] (2.42,2.12)-- (10.02,2.36);
\draw [line width=1.pt] (2.42,2.12)-- (10.08,-3.04);
\draw [line width=1.pt] (2.38,-2.62)-- (10.02,2.36);
\draw [line width=1.pt] (2.38,-2.62)-- (10.08,-3.04);
%\draw (2.18,-3.64) node[anchor=north west] {$X$};
\draw[color=black] (2.4,-4) node {\scalebox{2}{$X$}};
\draw[color=black] (10.1,-4.8) node {\scalebox{2}{$Y$}};

\draw [fill=ududff] (2.42,2.12) circle (2.5pt);
\draw[color=ududff] (2
,2.1) node {\scalebox{1.8}{$x_1$}};
\draw [fill=ududff] (2.38,-2.62) circle (2.5pt);
\draw[color=ududff] (1.9,-2.6) node {\scalebox{1.8}{$x_2$}};
\draw [fill=ududff] (10.02,2.36) circle (2.5pt);
\draw[color=ududff] (10.5,2.3) node {\scalebox{1.8}{$y_1$}};
\draw [fill=ududff] (10.08,-3.04) circle (2.5pt);
\draw[color=ududff] (10.5,-3.1) node {\scalebox{1.8}{$y_2$}};
\end{tikzpicture}
\end{document}

答案2

首先,删除荒谬的“准确性”。然后cm从椭圆尺寸中删除显式。

现在您可以扩展xy

\documentclass{article}
\usepackage{tikz}

\definecolor{ududff}{rgb}{0.3,0.3,1}

\begin{document}

\begin{tikzpicture}[line cap=round,line join=round,x=0.7cm,y=0.7cm]
%\clip(-2.,-6.) rectangle (16.,4.5);
\draw [rotate around={89.517:(2.4,-0.25)},line width=1.pt] (2.4,-0.25) ellipse (3.17 and 2.106);
\draw [rotate around={-89.363:(10.05,-0.34)},line width=1.pt] (10.05,-0.34)
  ellipse (3.848 and 2.742);
\draw [line width=1.pt] (2.42,2.12)-- (10.02,2.36);
\draw [line width=1.pt] (2.42,2.12)-- (10.08,-3.04);
\draw [line width=1.pt] (2.38,-2.62)-- (10.02,2.36);
\draw [line width=1.pt] (2.38,-2.62)-- (10.08,-3.04);
%\draw (2.18,-3.64) node[anchor=north west] {$X$};
\draw[color=black] (2.4,-4) node {$X$};
\draw[color=black] (10.1,-4.8) node {$Y$};

\draw [fill=ududff] (2.42,2.12) circle (2.5pt);
\draw[color=ududff] (2,2.1) node {$x_1$};
\draw [fill=ududff] (2.38,-2.62) circle (2.5pt);
\draw[color=ududff] (1.9,-2.6) node {$x_2$};
\draw [fill=ududff] (10.02,2.36) circle (2.5pt);
\draw[color=ududff] (10.5,2.3) node {$y_1$};
\draw [fill=ududff] (10.08,-3.04) circle (2.5pt);
\draw[color=ududff] (10.5,-3.1) node {$y_2$};
\end{tikzpicture}

\end{document}

我还删除了标签的缩放比例。

在此处输入图片描述

相关内容