【问题标题】:Replot matlab contour plots using gnuplot使用 gnuplot 重新绘制 matlab 等高线图
【发布时间】:2013-04-11 17:40:04
【问题描述】:

伙计们!

我正在(慢慢地)从 matlab 转向操作系统领域,我最近发现了 gnuplot,它创建了迄今为止非常好的图。

现在我想重新绘制我今年早些时候用 matlab 制作的一些图表(等高线图),但我对 gnuplot 的数据格式有点苦恼。

gnuplot 期望数据在

x0 y0 f(x0, y0)

格式,而出于我的目的,我使用

创建了所有数据文件
f(x0,y0), f(x0,y1), f(x0, y2)....
f(x1, y0), ....
..
.

格式(x 和 y 向量总是相同的,所以我没有丢失任何信息)。我可以避免重新格式化我所有的数据文件(非常大而且很多)并且仍然使用 gnuplot 以“类似 matlab”的方式使用现有文件,即轮廓(z),其中 z 是上面提到的数据?

在这里感谢大家的支持!

干杯, 克里斯

【问题讨论】:

    标签: matlab plot gnuplot file-format contour


    【解决方案1】:

    听起来你正在寻找splot '' matrix,来自help splot matrix

    Example commands for plotting uniform matrix data:
         splot 'file' matrix using 1:2:3          # ascii input
         splot 'file' binary general using 1:2:3  # binary input
    
    In a uniform grid matrix the z-values are read in a row at a time, i. e.,
        z11 z12 z13 z14 ...
        z21 z22 z23 z24 ...
        z31 z32 z33 z34 ...
    and so forth.
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-01-23
      • 1970-01-01
      • 2019-11-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多