gnuplot - gnuplot 中的复杂布局 : mixing text and graphs

标签 gnuplot

我正在考虑使用 Gnuplot 来满足我的需求是否可行。由于我对此经验很少,因此需要向更有知识的人请教。

我基本上需要可视化来自不同数据集的数据;但它不能合并在一个图上。另外,我需要添加文本来显示某些值,我无法将其显示为图例或在图的顶部,以免引起困惑。

我想做的是制作类似于您在 Xcode Instruments 中看到的东西:带有堆叠图的 GridView ,其中每个图并不占据绘图的整个部分,而只是其中的一部分,并且然后我可以将文本放在图的两侧的特定部分中。

类似这样的东西,给你一个视觉效果(当然不完全相同):

https://developer.apple.com/library/ios/documentation/ToolsLanguages/Conceptual/Xcode_Overview/art/Instruments_2x.png

我正在检查示例,并且能够在特定位置添加带有点的绘图;这帮助我使用

识别每个图上的特定值
set object circle

我找到了一种堆叠图表的方法,使用

set multi plot layout

但是我找不到一种简单的方法来调整绘图的大小,因此我可以在左侧和右侧腾出空间,在其中放置一些文本。

任何建议都非常受欢迎......我什至不知道 Gnuplot 实际上是否是完成这项工作的最佳工具。我会将情节图像放在报告和我们的内部网上。

最佳答案

设置 multiplot,然后更改边距,让您可以自由修改所有图表的位置并自定义它们之间的距离。如果您想要四个图表彼此重叠,类似于您在链接中显示的内容,您可以执行如下操作:

set multiplot

set lmargin at screen 0.2 # Sets left margin at 0.2 from left end
set rmargin at screen 0.9 # Sets right margin at 0.9 from left end

set tmargin at screen 0.9 # Sets top margin at 0.9 from bottom
set bmargin at screen 0.7 # Sets bottom margin at 0.2 from bottom

set format x '' # Remove numbers along x axis

plot sin(x)

set tmargin at screen 0.7 # Sets top margin at 0.7 from bottom
set bmargin at screen 0.5 # Sets bottom margin at 0.5 from bottom

plot cos(x)

set tmargin at screen 0.5 # Sets top margin at 0.5 from bottom
set bmargin at screen 0.3 # Sets bottom margin at 0.3 from bottom

plot exp(x)

set tmargin at screen 0.3 # Sets top margin at 0.3 from bottom
set bmargin at screen 0.1 # Sets bottom margin at 0.1 from bottom

set format x # Restore numbers along x axis

plot x**2

enter image description here

当然,您可以根据需要将其复杂化。

关于gnuplot - gnuplot 中的复杂布局 : mixing text and graphs,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23689689/

相关文章:

gnuplot - 在 Gnuplot 中绘制具有混合数据的多列文件

python - gnuplot:第 1 行:无效命令

linux - 在 Gnuplot 中命名图例条目,同时从数据文件中绘制

rust - Rust Gnuplot-将PNG以字节为单位保存在内存中

gnuplot - 与 gnuplot 一致的图形大小

python - 非线性回归中的标准误差

gnuplot - 更改 Axis 的比例

bash - gnuplot 直方图 : line 0: Too many columns in using specification

gnuplot - 自定义 GnuPlot 网格线

gnuplot - gnuplot 中的函数界限