gnuplot fit 是否有错误变量?
我正在制作一个 C++ 代码,它打印 gnuplot 命令,以便更快地绘制不同的东西。代码已经将数据绘制为数据拟合,但现在我添加了一些标签,并且我想打印拟合方程,我的意思是这种形式的
f(x) = (a +/- Δa)* x + (b +/- Δb)
我有以下行用于打印它
set label 1 at screen 0.22, screen 0.75 sprintf('f(x) = %3.4f*x + %3.4f', a, b)
但是,如您所见,只有 a 和 b 值没有错误,我在想将其放入 sprintf 函数任何与错误相关的变量(FIT_something) 然后有类似
set label 1 at screen 0.22, screen 0.75 sprintf('f(x) = (%3.4f +/- %3.4f)*x + (%3.4f + %3.4f)', a, deltaa, b, deltab)
但我找不到那些,我的答案是:那些存在吗?如果答案是否定的,有没有办法进一步打印变量错误,只需将其显式写在行上?
感谢您的帮助
I'm making a c++ code which prints commands for gnuplot, in order to plot different things faster. The code plots the data already as the data fit as well, but now I'm adding some labels, and I want to print the fit equation, I mean something with this form
f(x) = (a +/- Δa)*x + (b +/- Δb)
I have the following line for printing it
set label 1 at screen 0.22, screen 0.75 sprintf('f(x) = %3.4f*x + %3.4f', a, b)
But, as you can see, there is only a and b values with no errors, I was thinking something like put there in the sprintf
function any error related variables (FIT_something) and then have something like
set label 1 at screen 0.22, screen 0.75 sprintf('f(x) = (%3.4f +/- %3.4f)*x + (%3.4f + %3.4f)', a, deltaa, b, deltab)
But I can't find those, my answers are: does those exists? and if the answer is no, is there any way to print the variable errors further just writing it explicitly on the line?
Thanks for your help
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请阅读GNUPLOT文档的统计概述部分(
help statistics_overview
)。请记住,那里描述的警告,另请参阅文档的set fit for rorryvariables
,我在下面提取:Please read the statistical overview section of the gnuplot documentation (
help statistical_overview
). Keeping in mind the caveats described there, see also the documentation forset fit errorvariables
, which I extract below: