gnuplot:数据矩阵的3D图 [英] gnuplot: 3D plot of a matrix of data

查看:109
本文介绍了gnuplot:数据矩阵的3D图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何在Gnuplot中绘制(3D图)具有这种数据结构的矩阵, 使用第一行和第一列作为x和y刻度(第一行的第一个数字是列数)?

How can I plot (a 3D plot) a matrix in Gnuplot having such data structure, using the first row and column as a x and y ticks (the first number of the first row is the number of columns) ?

4 0.5 0.6 0.7 0.8
1 -6.20 -6.35 -6.59 -6.02
2 -6.39 -6.52 -6.31 -6.00
3 -6.36 -6.48 -6.15 -5.90
4 -5.79 -5.91 -5.87 -5.46

推荐答案

完全可以使用matrix nonuniform读取此数据格式:

Exactly this data format can be read in with matrix nonuniform:

set view 50,20
set ticslevel 0
splot 'data.txt' matrix nonuniform with lines t ''

这会生成正确的抽动,如数据文件中指定的那样:

This generates the correct tics, like specified in the data file:

这篇关于gnuplot:数据矩阵的3D图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆