Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Gnuplot从文件进行三维打印,在x、y和z刻度上没有足够的详细值_Plot_Gnuplot - Fatal编程技术网

Gnuplot从文件进行三维打印,在x、y和z刻度上没有足够的详细值

Gnuplot从文件进行三维打印,在x、y和z刻度上没有足够的详细值,plot,gnuplot,Plot,Gnuplot,我有一个简单的数据,我想打印为3D打印(3列被逗号分隔): 我编写了一个简单的脚本来绘制上述数据: #!/usr/bin/gnuplot set palette rgbformulae 33,13,10 set datafile separator "," set terminal postscript eps size 10.5, 5.62 enhanced color font 'Helvetica,20' linewidth 2 set output 'test.eps' set x

我有一个简单的数据,我想打印为3D打印(3列被逗号分隔):

我编写了一个简单的脚本来绘制上述数据:

#!/usr/bin/gnuplot

set palette rgbformulae 33,13,10
set datafile separator ","

set terminal postscript eps size 10.5, 5.62 enhanced color font 'Helvetica,20' linewidth 2
set output 'test.eps'

set xlabel "time [s] (no operation)" offset -4, 0, 0
set xtics left offset 0,-0.3 rotate by 45 right
set xrange [0:400]

set ylabel "ranges" offset 2, 0, 0
set ytics left offset 0,-0.5

set zlabel "devices" offset -4, 0, 0 
set zrange [0:50]
set autoscale

set title " "
set key inside left top;

set dgrid3d 30,30
set hidden3d

set style line 1 linecolor rgb '00FF00'  linetype 4 linewidth 1 

splot "data.csv" u 1:2:3 title "" with lines  palette 
以及我的输出:

正如大家所看到的,输出图像(或者,我应该说)x、y和z轴上的x、y和z记号不够详细。很难说输出图像是用这些数据绘制的

是否有一种方法可以让我以某种优雅的方式操纵从文件中获取的x、y和z记号

我还希望图像在新的x、y和z记号下更具可读性,因此我认为
10000.0000000
值应该只出现一次,当它第一次出现在数据文件中时


多谢各位

不完全是对你问题的回答,这是我个人的观点,但你可能对以下想法感兴趣:

  • 数据似乎不是网格数据,所以我不会使用任何类型的曲面图
  • 仅在3d中绘制数据点并不能提供有用的图片,它只是空间某处的一条直线。我会尝试使用2D绘图,其中包含高度信息作为颜色
  • 我会用对数刻度表示y轴
这将导致以下脚本:

set terminal pngcairo
set output 'test.png'

set datafile separator ","
set palette rgbformulae 33,13,10

# Set margins to keep colorbox label inside the picture
set lmargin screen 0.12
set rmargin screen 0.85

set xlabel "time [s] (no operation)"
set ylabel "ranges"
set cblabel "devices"

unset key

set yrange  [1e-8:1e5]
set ytics format "1e%+T"
set logscale y

set view map
set cbrange [0:50]
set zrange [0:50]

splot "data.csv" u 1:2:3 w p pt 7 palette ,\
      "data.csv" every 5::4 u ($1+0):($2/3):(0):($3 != 30 ? 3 : "") with labels
它还打印一些数据点的z标签,由于间距原因跳过30

结果是:


请注意,
设置自动缩放
重置
设置X范围[0:400]
。。。命令。
set terminal pngcairo
set output 'test.png'

set datafile separator ","
set palette rgbformulae 33,13,10

# Set margins to keep colorbox label inside the picture
set lmargin screen 0.12
set rmargin screen 0.85

set xlabel "time [s] (no operation)"
set ylabel "ranges"
set cblabel "devices"

unset key

set yrange  [1e-8:1e5]
set ytics format "1e%+T"
set logscale y

set view map
set cbrange [0:50]
set zrange [0:50]

splot "data.csv" u 1:2:3 w p pt 7 palette ,\
      "data.csv" every 5::4 u ($1+0):($2/3):(0):($3 != 30 ? 3 : "") with labels