作者ittfie (kevin)
标题Re: [问题] 关於PSTricks
时间Wed Aug 17 02:25:24 2016
GeoGebra 这个汇出功能似乎不是那麽完善(印象中连 eps 档都会和原图差满多的
PSTricks 我想应该就只是做一个很简单的程式码转换而已
所以出错也不是很让人意外
这里主要的错误应该是 \psplot 那两行的 ld() 这个函数 PSTricks 并不存在
我把它改成 ln() 就可以跑出曲线了
不过 1.0000000000000004 这一行还是执行错误
似乎是因为这样的范围让绘图结果超过画面太多的缘故
把那一串零去掉几个就行了
建议如果真的要在 LaTeX 画这种图的话可以直接用 PGFPlots
减少这种转换上的麻烦~
※ 引述《LeonYo (仆は美味しいです)》之铭言:
: 我用GeoGebra汇出PSTricks档, 想在latex上画图,
: 输出了两个, 一个能正常显示, 另一个曲线却无法显示,
: 来请教一下到底出了什麽问题?
: 而且正常的改了一些像坐标的参数後, 竟然也无法输出, 真是怪哉orz
: 以下是可以输出的PSTricks
: \pagestyle{empty}
: \newrgbcolor{qqwuqq}{0. 0.4 0.}
: \newrgbcolor{ccqqqq}{0.8 0. 0.}
: \psset{xunit=.75cm,yunit=.75cm,algebraic=true,dimen=middle,dotstyle=o,dotsize=5pt
: 0,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25}
: \begin{pspicture*}(-0.49457247328791076,-1.5029225537715332)(5.501456041122476,2.4944297891687195)
: \psaxes[labelFontSize=\scriptstyle,xAxis=true,yAxis=true,Dx=1.,Dy=1.,ticksize=-2pt
: 0,subticks=2]{->}(0,0)(-0.49457247328791076,-1.5029225537715332)(5.501456041122476,2.4944297891687195)
: \psplot{-0.49457247328791076}{5.501456041122476}{(-0.--1.*x)/1.}
: \psplot[linewidth=1.2pt,linecolor=qqwuqq,plotpoints=200]{1.0000035902425313}{5.501456041122476}{ln(x-1.0)/ln(2.0)}
: \psplot[linewidth=1.2pt,linecolor=ccqqqq,plotpoints=200]{3.942694715705307E-6}{5.501456041122476}{ln(x)/ln(2.0)}
: \begin{scriptsize}
: \rput[bl](-4.438979752083265,-4.613445072284644){$f$}
: \rput[bl](1.1599607812403419,-4.613445072284644){\qqwuqq{$g$}}
: \rput[bl](0.16724082852339028,-4.613445072284644){\ccqqqq{$h$}}
: \psdots[dotsize=4pt 0,dotstyle=*](2.,1.)
: \psdots[dotsize=4pt 0,dotstyle=*](1.,0.)
: \psdots[dotsize=4pt 0,dotstyle=*](0.5,-1.)
: \psdots[dotsize=4pt 0,dotstyle=*](4.,2.)
: \psdots[dotsize=4pt 0,dotstyle=*](1.5,-1.)
: \psdots[dotsize=4pt 0,dotstyle=*](2.,0.)
: \psdots[dotsize=4pt 0,dotstyle=*](3.,1.)
: \psdots[dotsize=4pt 0,dotstyle=*](5.,2.)
: \end{scriptsize}
: \end{pspicture*}
: 以下是无法显示曲线的:
: \pagestyle{empty}
: \psset{xunit=1.0cm,yunit=1.0cm,algebraic=true,dimen=middle,dotstyle=o,dotsize=5pt
: 0,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25}
: \begin{pspicture*}(-0.5,-1.)(5.5,2.5)
: \psaxes[labelFontSize=\scriptstyle,xAxis=true,yAxis=true,Dx=1.,Dy=1.,ticksize=-2pt
: 0,subticks=2]{->}(0,0)(-0.5,-1.)(5.5,2.5)
: \psplot{-0.5}{5.5}{(-0.--1.*x)/1.}
: \psplot[linewidth=1.2pt,linecolor=red,plotpoints=200]{1.0000000000000004}{5.5}{ld(x-1.0)}
: \psplot[linewidth=1.2pt,linestyle=dashed,dash=1pt
: 1pt,plotpoints=200]{3.999999999977212E-6}{5.5}{ld(x)}
: \begin{scriptsize}
: \rput[bl](-5.184960774378413,-5.376394038404407){$f$}
: \rput[bl](1.1610284276553742,-5.376394038404407){\red{$g$}}
: \rput[bl](0.15461604319186611,-5.376394038404407){$h$}
: \psdots[dotsize=4pt 0,dotstyle=*](1.,0.)
: \psdots[dotsize=4pt 0,dotstyle=*](2.,0.)
: \psdots[dotsize=4pt 0,dotstyle=*](2.,1.)
: \psdots[dotsize=4pt 0,dotstyle=*](3.,1.)
: \psdots[dotsize=4pt 0,dotstyle=*](4.,2.)
: \psdots[dotsize=4pt 0,dotstyle=*](5.,2.)
: \end{scriptsize}
: \end{pspicture*}
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 140.112.243.1
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/LaTeX/M.1471371926.A.CC7.html