![当我从 geogebra 导出图表时,我得到的是没有函数图的轴?为什么](https://linux22.com/image/470599/%E5%BD%93%E6%88%91%E4%BB%8E%20geogebra%20%E5%AF%BC%E5%87%BA%E5%9B%BE%E8%A1%A8%E6%97%B6%EF%BC%8C%E6%88%91%E5%BE%97%E5%88%B0%E7%9A%84%E6%98%AF%E6%B2%A1%E6%9C%89%E5%87%BD%E6%95%B0%E5%9B%BE%E7%9A%84%E8%BD%B4%EF%BC%9F%E4%B8%BA%E4%BB%80%E4%B9%88.png)
当我从 geogebra 导出图表时,我得到的是没有函数图的轴?为什么
代码 :
\documentclass[12pt]{article}
\usepackage{pgf,tikz}
\usepackage{mathrsfs}
\usetikzlibrary{arrows}
\pagestyle{empty}
\begin{document}
\definecolor{dcrutc}{rgb}{0.8627450980392157,0.0784313725490196,0.23529411764705882}
\definecolor{cqcqcq}{rgb}{0.7529411764705882,0.7529411764705882,0.7529411764705882}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
\draw [color=cqcqcq,, xstep=1.0cm,ystep=1.0cm] (-4.,-4.) grid (7.,6.);
\draw[->,ultra thick,color=black] (-4.,0.) -- (7.,0.);
\foreach \x in {-4.,-3.,-2.,-1.,1.,2.,3.,4.,5.,6.}
\draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below] {\footnotesize $\x$};
\draw[->,ultra thick,color=black] (0.,-4.) -- (0.,6.);
\foreach \y in {-4.,-3.,-2.,-1.,1.,2.,3.,4.,5.}
\draw[shift={(0,\y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left] {\footnotesize $\y$};
\draw[color=black] (0pt,-10pt) node[right] {\footnotesize $0$};
\clip(-4.,-4.) rectangle (7.,6.);
\draw[line width=1.2pt,color=dcrutc, smooth,samples=100,domain=0.0:0.15] plot[parametric] function{-27.69*t**(3.0)+0.0*t**(2.0)+13.89*t-3.0,-51.46*t**(3.0)+0.0*t**(2.0)-5.46*t+4.0};
\draw[line width=1.2pt,color=dcrutc, smooth,samples=100,domain=0.15:0.25] plot[parametric] function{-35.69*t**(3.0)+3.62*t**(2.0)+13.35*t-2.97,77.51*t**(3.0)-58.34*t**(2.0)+3.33*t+3.56};
\draw[line width=1.2pt,color=dcrutc, smooth,samples=100,domain=0.25:0.4] plot[parametric] function{62.34*t**(3.0)-68.76*t**(2.0)+31.16*t-4.43,-79.27*t**(3.0)+57.43*t**(2.0)-25.16*t+5.9};
\draw[line width=1.2pt,color=dcrutc, smooth,samples=100,domain=0.4:0.55] plot[parametric] function{-10.1*t**(3.0)+17.48*t**(2.0)-3.07*t+0.09,410.98*t**(3.0)-526.32*t**(2.0)+206.53*t-24.76};
\draw[line width=1.2pt,color=dcrutc, smooth,samples=100,domain=0.55:0.7] plot[parametric] function{-21.95*t**(3.0)+36.97*t**(2.0)-13.74*t+2.04,-397.63*t**(3.0)+802.26*t**(2.0)-521.1*t+108.08};
\draw[line width=1.2pt,color=dcrutc, smooth,samples=100,domain=0.7:0.85] plot[parametric] function{97.91*t**(3.0)-214.2*t**(2.0)+161.69*t-38.8,12.51*t**(3.0)-57.12*t**(2.0)+79.14*t-31.67};
\draw[line width=1.2pt,color=dcrutc, smooth,samples=100,domain=0.85:1.0] plot[parametric] function{-77.93*t**(3.0)+233.8*t**(2.0)-218.77*t+68.9,55.85*t**(3.0)-167.55*t**(2.0)+172.91*t-58.21};
\begin{scriptsize}
\draw[color=dcrutc] (-1.374,2.878) node {$Cf$};
\end{scriptsize}
\end{tikzpicture}
\end{document}
编辑 :
我去安装 gunplot 然后编译它但得到了相同的结果。
文件 f1.pgf-plot 正常,但是哪里有错误?
答案1
- 在 f1.tex 中,您有 7 个函数,没有
id
,则只会创建一个表Gnuplot
(最后一个)。因此,每个函数都需要一个标识符。
[parametric,id=pgf-plot1]
对于第一个函数
[parametric,id=pgf-plot2]
对于第二个功能......
- 第一次编译后,只有轴
pdf
和 7 个警告。
f1.pgf-plot1.table not found
...
但文件夹中创建了 7 个文件。
- 您必须使用以下命令打开每个文件才能
gnuplot
创建.table
文件
第二次编译
pdflatex
和...\documentclass[12pt]{article} \usepackage{pgf,tikz} \usepackage{mathrsfs} \usetikzlibrary{arrows} \pagestyle{empty} \begin{document} \definecolor{dcrutc}{rgb}{0.8627450980392157,0.0784313725490196,0.23529411764705882} \definecolor{cqcqcq}{rgb}{0.7529411764705882,0.7529411764705882,0.7529411764705882} \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm] \draw [color=cqcqcq, xstep=1.0cm,ystep=1.0cm] (-4.,-4.) grid (7.,6.); \draw[->,ultra thick,color=black] (-4.,0.) -- (7.,0.); \foreach \x in {-4.,-3.,-2.,-1.,1.,2.,3.,4.,5.,6.} \draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below] {\footnotesize $\x$}; \draw[->,ultra thick,color=black] (0.,-4.) -- (0.,6.); \foreach \y in {-4.,-3.,-2.,-1.,1.,2.,3.,4.,5.} \draw[shift={(0,\y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left] {\footnotesize $\y$}; \draw[color=black] (0pt,-10pt) node[right] {\footnotesize $0$}; \clip(-4.,-4.) rectangle (7.,6.); \draw[line width=1.2pt,color=dcrutc, smooth,samples=100,domain=0.0:0.15] plot[parametric,id=pgf-plot1] function{-27.69*t**(3.0)+0.0*t**(2.0)+13.89*t-3.0,-51.46*t**(3.0)+0.0*t**(2.0)-5.46*t+4.0}; \draw[line width=1.2pt,color=dcrutc, smooth,samples=100,domain=0.15:0.25] plot[parametric,id=pgf-plot2] function{-35.69*t**(3.0)+3.62*t**(2.0)+13.35*t-2.97,77.51*t**(3.0)-58.34*t**(2.0)+3.33*t+3.56}; \draw[line width=1.2pt,color=dcrutc, smooth,samples=100,domain=0.25:0.4] plot[parametric,id=pgf-plot3] function{62.34*t**(3.0)-68.76*t**(2.0)+31.16*t-4.43,-79.27*t**(3.0)+57.43*t**(2.0)-25.16*t+5.9}; \draw[line width=1.2pt,color=dcrutc, smooth,samples=100,domain=0.4:0.55] plot[parametric,id=pgf-plot4] function{-10.1*t**(3.0)+17.48*t**(2.0)-3.07*t+0.09,410.98*t**(3.0)-526.32*t**(2.0)+206.53*t-24.76}; \draw[line width=1.2pt,color=dcrutc, smooth,samples=100,domain=0.55:0.7] plot[parametric,id=pgf-plot5] function{-21.95*t**(3.0)+36.97*t**(2.0)-13.74*t+2.04,-397.63*t**(3.0)+802.26*t**(2.0)-521.1*t+108.08}; \draw[line width=1.2pt,color=dcrutc, smooth,samples=100,domain=0.7:0.85] plot[parametric,id=pgf-plot6] function{97.91*t**(3.0)-214.2*t**(2.0)+161.69*t-38.8,12.51*t**(3.0)-57.12*t**(2.0)+79.14*t-31.67}; \draw[line width=1.2pt,color=dcrutc, smooth,samples=100,domain=0.85:1.0] plot[parametric,id=pgf-plot7] function{-77.93*t**(3.0)+233.8*t**(2.0)-218.77*t+68.9,55.85*t**(3.0)-167.55*t**(2.0)+172.91*t-58.21}; %\begin{scriptsize}%<-- {\scriptsize \draw[color=dcrutc] (-1.374,2.878) node {$Cf$}; %\end{scriptsize} } \end{tikzpicture} \end{document}
备注:环境 scriptsize 不存在。请参阅此帖子与 {\bfseries ...} 相比,\begin{bfseries} 中的空间过多