我不太熟悉使用 TikZ-pgf 绘图。不过,我将用这个绘制下图:
编辑我的曼努埃尔·库纳
我使用的代码如下:
\documentclass[10pt]{article}
\usepackage{pgf,tikz}
\usepackage{mathrsfs}
\usetikzlibrary{arrows}
\pagestyle{empty}
\begin{document}
\definecolor{xdxdff}{rgb}{0.49019607843137253,0.49019607843137253,1.}
\definecolor{ffdxqq}{rgb}{1.,0.8431372549019608,0.}
\definecolor{ffzzqq}{rgb}{1.,0.6,0.}
\definecolor{wwccqq}{rgb}{0.4,0.8,0.}
\definecolor{qqzzqq}{rgb}{0.,0.6,0.}
\definecolor{qqzzff}{rgb}{0.,0.6,1.}
\definecolor{ffqqqq}{rgb}{1.,0.,0.}
\definecolor{qqqqff}{rgb}{0.,0.,1.}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=31249.999999999996cm,y=5.0cm]
\draw[->,color=black] (0.,0.) -- (1.6E-4,0.);
\foreach \x in {}
\draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below] {\footnotesize $\x$};
\draw[->,color=black] (0.,0.) -- (0.,1.);
\foreach \y in {,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.}
\draw[shift={(0,\y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left] {\footnotesize $\y$};
\draw[color=black] (0pt,-10pt) node[right] {\footnotesize $0$};
\clip(0.,0.) rectangle (1.6E-4,1.);
\draw[line width=1.2pt,color=qqzzff,smooth,samples=100,domain=0.0:1.6E-4] plot(\x,{0-1.209E12*(\x)^(3.0)+2.4E8*(\x)^(2.0)-5028.3*(\x)+0.0493});
\draw[line width=1.2pt,color=wwccqq,smooth,samples=100,domain=0.0:1.6E-4] plot(\x,{0-2.841E11*(\x)^(3.0)+2.185E7*(\x)^(2.0)+5514.2*(\x)+0.2326});
\draw[line width=1.2pt,color=ffdxqq,smooth,samples=100,domain=0.0:1.6E-4] plot(\x,{0-2.304E10*(\x)^(3.0)+2051000.0*(\x)^(2.0)+180.1*(\x)+0.4336});
\begin{scriptsize}
\draw [fill=qqqqff] (4.9999999999999996E-6,0.025) circle (2.5pt);
\draw [fill=qqqqff] (1.E-5,0.028) circle (2.5pt);
\draw [fill=qqqqff] (5.E-5,0.245) circle (2.5pt);
\draw [fill=qqqqff] (1.E-4,0.738) circle (2.5pt);
\draw [fill=qqqqff] (1.5E-4,0.614) circle (2.5pt);
\draw [color=ffqqqq] (1.1E-4,0.74)-- ++(-2.0pt,-2.0pt) -- ++(4.0pt,4.0pt) ++(-4.0pt,0) -- ++(4.0pt,-4.0pt);
\draw[color=ffqqqq] (1.267692141088968E-4,0.7827306483430722) node {$(0.00011, 0.74)$};
\draw[color=qqzzff] (4.9837731294315994E-5,0.10589055646933908) node {$y_1(x) = -1209000000000x³ + 240000000x² - 5028.3x + 0.0493$};
\draw [fill=qqzzqq] (5.E-6,0.271) circle (2.5pt);
\draw [fill=qqzzqq] (1.E-5,0.277) circle (2.5pt);
\draw [fill=qqzzqq] (5.E-5,0.531) circle (2.5pt);
\draw [fill=qqzzqq] (1.E-4,0.717) circle (2.5pt);
\draw [fill=qqzzqq] (1.5E-4,0.593) circle (2.5pt);
\draw [color=ffqqqq] (1.1E-4,0.7)-- ++(-2.0pt,-2.0pt) -- ++(4.0pt,4.0pt) ++(-4.0pt,0) -- ++(4.0pt,-4.0pt);
\draw[color=ffqqqq] (1.2676921410889684E-4,0.6663987575522743) node {$(0.00011, 0.7)$};
\draw[color=wwccqq] (4.776782592710754E-5,0.1746321283002651) node {$y_2(x) = -284100000000x³ + 21850000x² + 5514.2x + 0.2326$};
\draw [fill=ffzzqq] (5.E-6,0.435) circle (2.5pt);
\draw [fill=ffzzqq] (1.E-5,0.435) circle (2.5pt);
\draw [fill=ffzzqq] (5.E-5,0.445) circle (2.5pt);
\draw [fill=ffzzqq] (1.E-4,0.449) circle (2.5pt);
\draw [fill=ffzzqq] (1.5E-4,0.429) circle (2.5pt);
\draw[color=ffdxqq] (5.984227390249018E-5,0.3914324702285702) node {$y_3(x) = -23040000000x³ + 2051000x² + 180.1x + 0.4336$};
\end{scriptsize}
\end{tikzpicture}
\end{document}
这是我的问题:出现一条错误消息:
我无法处理大于 19 英尺的尺寸。
我该如何修复该问题以获得正确的情节?
多谢!
答案1
由于评论太多,我尝试对代码进行一些修改。基本上,我尝试合理地缩放曲线方程、坐标间隔和点的位置。修改后的代码如下所示。
\documentclass[10pt]{article}
\usepackage{pgf,tikz}
\usepackage{mathrsfs}
\usetikzlibrary{arrows}
\pagestyle{empty}
\begin{document}
\definecolor{xdxdff}{rgb}{0.49019607843137253,0.49019607843137253,1.}
\definecolor{ffzztt}{rgb}{1.,0.6,0.2}
\definecolor{ffdxqq}{rgb}{1.,0.8431372549019608,0.}
\definecolor{ffzzqq}{rgb}{1.,0.6,0.}
\definecolor{wwccqq}{rgb}{0.4,0.8,0.}
\definecolor{qqzzqq}{rgb}{0.,0.6,0.}
\definecolor{qqzzff}{rgb}{0.,0.6,1.}
\definecolor{ffqqqq}{rgb}{1.,0.,0.}
\definecolor{qqqqff}{rgb}{0.,0.,1.}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=0.9cm,y=5.5cm]
\draw[->,color=black] (0.,0.) -- (8.5,0.);
\foreach \x in {,2.,4.,6.,8.}
\draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt);
\node[below] at (2,0) {\footnotesize $4\times 10^{-5}$};
\node[below] at (4,0) {\footnotesize $8\times 10^{-5}$};
\node[below] at (6,0) {\footnotesize $1.2\times 10^{-4}$};
\node[below] at (8,0) {\footnotesize $1.6\times 10^{-4}$};
\draw[->,color=black] (0.,0.) -- (0.,1.1);
\foreach \y in {,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.}
\draw[shift={(0,\y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left] {\footnotesize $\y$};
\draw[color=black] (0pt,-10pt) node[right] {\footnotesize $0$};
\clip(0.,0.) rectangle (8.5,1.);
\draw[line width=1.2pt,color=qqzzff,smooth,samples=100,domain=0.0:8.5] plot(\x,{0-0.0097*(\x)^(3.0)+0.096*(\x)^(2.0)-0.1006*(\x)+0.0493});
\draw[line width=1.2pt,color=wwccqq,smooth,samples=100,domain=0.0:8.5] plot(\x,{0-0.0023*(\x)^(3.0)+0.0087*(\x)^(2.0)+0.1103*(\x)+0.2326});
\draw[line width=1.2pt,color=ffdxqq,smooth,samples=100,domain=0.0:8.5] plot(\x,{0-2.0E-4*(\x)^(3.0)+8.0E-4*(\x)^(2.0)+0.0036*(\x)+0.4336});
\begin{scriptsize}
\draw [fill=qqqqff] (0.25,0.025) circle (2.5pt);
\draw [fill=qqqqff] (0.5,0.028) circle (2.5pt);
\draw [fill=qqqqff] (2.5,0.245) circle (2.5pt);
\draw [fill=qqqqff] (5.,0.738) circle (2.5pt);
\draw [fill=qqqqff] (7.5,0.614) circle (2.5pt);
\draw [color=ffqqqq] (5.5,0.74)-- ++(-2.0pt,-2.0pt) -- ++(4.0pt,4.0pt) ++(-4.0pt,0) -- ++(4.0pt,-4.0pt);
\draw[color=ffqqqq, right] (6.220444277733656,0.8009433424562268);
\node [color=ffqqqq, right] at (5.5, 0.74) {$(1.1\times 10^{-4}, 0.74)$};
\draw[color=qqzzff] (3.2539639594501097,0.05156399945292019);
\node [color=qqzzff, right] at (0,0.98) {$y_1= -1.209\times 10^{12}x^{3} + 2.4\times 10^{8}x^{2} - 5028.3x + 0.0493$};
\draw [fill=qqzzqq] (0.25,0.271) circle (2.5pt);
\draw [fill=qqzzqq] (0.5,0.277) circle (2.5pt);
\draw [fill=qqzzqq] (2.5,0.531) circle (2.5pt);
\draw [fill=qqzzqq] (5.,0.717) circle (2.5pt);
\draw [fill=qqzzqq] (7.5,0.593) circle (2.5pt);
\draw [color=ffqqqq] (5.5,0.7)-- ++(-2.0pt,-2.0pt) -- ++(4.0pt,4.0pt) ++(-4.0pt,0) -- ++(4.0pt,-4.0pt);
\draw[color=ffqqqq] (6.220444277733656,0.6503143287872204) node {$(1.1\times 10^{-4}, 0.70)$};
\draw[color=wwccqq] (2.8217615289717126,0.20219301312192653);
\node [color=wwccqq, right] at (0, 0.9) {$y_2 = -2.841\times 10^{11}x^{3} + 2.185\times 10^{7}x^{2} + 5514.2x + 0.2326$};
\draw [fill=ffzzqq] (0.25,0.435) circle (2.5pt);
\draw [fill=ffzzqq] (0.5,0.445) circle (2.5pt);
\draw [fill=ffzzqq] (2.5,0.449) circle (2.5pt);
\draw [fill=ffzzqq] (5.,0.429) circle (2.5pt);
\draw[color=ffdxqq] (2.7824703989282216,0.37165065349955867);
\node [color=ffdxqq, right] at (0, 0.82) {$y_3 = -2.304\times 10^{10}x^{3} + 2.051\times 10^{6}x^{2} + 180.1x + 0.4336$};
\draw [fill=ffzztt] (7.5,0.429) circle (2.5pt);
\end{scriptsize}
\end{tikzpicture}
\end{document}
感谢您的建议!