gnuplot - 我可以将评论放入长情节命令中吗?
问题描述
我的 gnuplot 绘图命令是
tM=1.0*(a0*xmax+ymax)
set parametric
set trange [-0.2:tM]
plot 1/0,1/0 title '\ict\qquad' lc rgb 'gray80' dt 5 lw 2,\
uldx0(t),uldy0(t) title '\disct' lc rgb 'web-green' lw 3,\
hpx0(t),hpy0(t) lc rgb 'pink' lw 2,\
vpx0(t),vpy0(t) with filledcurve xy= 0.5*(xmi0+xpl0),0\
fs transparent solid 0.25 fc rgb 'cyan' ,\
for [n=1:5] ix0(n*0.05+t*n*0.005/tM ,u0(0,n*0.05)),\
iy0(n*0.05+t*n*0.005/tM,u0(0,n*0.05))\
lc rgb 'gray80' dt 5 lw 2,\
for [n=6:10] ix0(n*0.05+t*n*0.01/tM ,u0(0,n*0.05)),\
iy0(n*0.05+t*n*0.01/tM,u0(0,n*0.05))\
lc rgb 'gray80' dt 5 lw 2,\
for [n=22:36] ix0(n*0.025+t ,u0(0,n*0.025)),\
iy0(n*0.025+t,u0(0,n*0.025))\
lc rgb 'gray80' dt 5 lw 2,\
x0(t*pmax0(q1)/tM,q1), y0(t*pmax0(q1)/tM,q1) \
lc rgb q1color lw 2,\
x0(t*pmax0(ql0)/tM,ql0), y0(t*pmax0(ql0)/tM,ql0) \
lc rgb qlcolor lw 2,\
x0(t*pmax0(QqxyL0)/tM,QqxyL0), y0(t*pmax0(QqxyL0)/tM,QqxyL0) \
lc rgb qhatmicolor lw 2,\
x0(t*pmax0(q2)/tM,q2) , y0(t*pmax0(q2)/tM,q2) \
lc rgb q2color lw 2,\
x0(t*pmax0(qpl0)/tM,qpl0), y0(t*pmax0(qpl0)/tM,qpl0) \
lc rgb qplcolor lw 2,\
x0(t*pmax0(QqxyR0)/tM,QqxyR0), y0(t*pmax0(QqxyR0)/tM,QqxyR0) \
lc rgb qhatplcolor lw 2
有没有一种很好的方法可以用评论来打破这个问题,如果我决定稍后再看,这也会有所帮助吗?
解决方案
全部在一个plot
命令中,对吗?我认为最接近的是利用 plot 命令的每个子句都可以以定义开头的事实。预期用途类似于plot a=2 x**a
,但您可以选择一些垃圾变量并将其分配给注释字符串
plot \
_c="Straight line" x title _c, \
_c="Parabola" x**2 title 'x^2', \
_c="Some weird function" real(sinh(sqrt(x))) title 'squint(x)'
如果您愿意,可以在情节标题中使用该注释字符串,这与最初的预期用途很接近。但你也可以在情节条款中忽略它。然后它只会与阅读源代码的人相关,而不是与 plot 命令的输出相关。
推荐阅读
- powerbi - PowerApps 使用分析停止更新
- iphone - 来自网络摄像头的 WebRTC 快照并将其保存到 PHP 中的服务器:iPhone Safari 在分辨率高于 2096 时崩溃
- algorithm - 计算形成字符串的连续子串的有序可能不连续子串的数量
- linux-kernel - ebpf:关闭 bpf 对象并链接实例
- sql-server - 仅在日期时间列中显示日期然后将其转换为 Varchar 的最有效方法
- php - Laravel 护照 - 中间件 client_credentials 不记名令牌不起作用
- c++ - 如何使用析构函数删除在类构造函数中分配的动态内存
- splunk - 如何使用 Multisearch 在两个搜索查询之间进行交叉验证和计数
- angular - Angular,如何在没有更改检测问题的情况下将值从 HTML 模板传递到组件
- firebase - Facebook 登录弹出窗口不会显示在我的 React Native Expo 应用程序上(使用 Firebase)