gnuplot - 如何在 Gnuplot 上以 f(x,y)=0 的形式绘制特定解
问题描述
我需要在 Gnuplot 上绘制一个与 0 相交的两个变量函数,即:f(x,y)=0。这将意味着 2D 绘图而不是 3D。到目前为止,我的尝试是:
set term cairolatex eps standalone size 6in,6in lw 7
set key box opaque samplen 6
set key spacing 1.5
set key Right
set key height 2
set key width 3
f(x,y)=...
set output 'V.tex'
plot f(x,y)=0 title '\small${\hat{V}=2}$' lc rgb "black"
set out
但它返回函数以绘制预期。
以防万一,Gnuplot FAQ 的 5.2 部分中给出的解决方法http://www.gnuplot.info/faq/faq.html
不会生成我可以编译的 .tex 文件。
解决方案
我尝试将常见问题解答(@gdupras 的答案)中的代码与您最初显示的代码结合起来。
set term cairolatex eps standalone size 6in,6in lw 7
set key box opaque samplen 6
set key spacing 1.5
set key Right
set key height 2
set key width 3
f(x,y) = y - x**2 / tan(y)
set contour base
set cntrparam levels discrete 0.0
unset surface
set table $TEMP
splot f(x,y)
unset table
set output 'V.tex'
plot $TEMP w l title '\small${\hat{V}=2}$' lc rgb "black"
set out
在我的环境中,此代码生成“V.tex”,编译后得到下图(PDF 转换为 PNG)。
推荐阅读
- reactjs - 如何使用 ReactJs 将 jwt 令牌提交给 Spring Security?
- kotlin - 生产
与频道 () - vb.net - 需要在收件箱中查找特定邮件,保存附件以共享,然后将电子邮件移动到不同的文件夹 VB.Net
- javascript - 如何将函数组合内的突变转换为局部的、不可观察的突变?
- reactjs - 开玩笑 - 在 React 中测试模态会出错
- react-native - react native底部选项卡中tabbaroptions的activebackgroundcolor
- shell - 执行 mqtt 命令的 Shells 脚本
- sql - 当列具有 DATE 约束时,将空字符串更改为 NULL
- windows - Powershell中的空格分割模式输出
- php - Foreach 结束循环警报