如何创建一个3D极图,gnuplot的 [英] how to create a 3d polar graph with gnuplot

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

问题描述

我调查麦克风的频率响应。

I'm investigating the frequency responses of microphones.

要帮助分析他们,我写了一个程序,将输出:到达角,频率(Hz)和响应以给定角度和频率(分贝)

To help analyse them, I've written a program that will output: arrival angle, frequency(Hz), and response at a given angle and frequency (dB).

我已经写了一个gnuplot的脚本,将图中的所有这些数据转化为三维图:

I've written a gnuplot script that will graph all this data into a 3d graph:

在code为gnuplot的是:

The code for the gnuplot is:

set xlabel "Arrival Angle (degrees)" font "arial,8"
set ylabel "Frequency (Hz)" font "arial,8"
set zlabel "Gain (dB)" font "arial,8"

set grid lc rgbcolor "#BBBBBB"

set xrange[-180:180]
set yrange[0:20000]
set zrange[-60:0]

unset key
set view 30,56,0.98

splot 'freq.dat' u 1:2:3 with pm3d

我知道这是一个有点不寻常,但我想要做的,是重新在一种三维极线图的present这一点,但我无法弄清楚如何做到这一点。的(坏)下图,显示了的事情,我一直在努力实现的排序:

I know it's a bit unusual, but what I'd like to do, is represent this on a sort of 3d polar graph, but I can't figure out how to do it. The (bad) drawing below, shows the sort of thing I've been trying to achieve:

任何人都可以点我在正确的方向?

Can anybody point me in the right direction?

在此先感谢。 戴夫。


更新26日至4月2013

我已经被玩弄和已经创建了一个更新脚本:

I've been playing around and have created an updated script:

reset
set title "3D version using cylindrical coordinate system"
set ticslevel 0.0
set view 30,56,0.98
set angles degrees
set mapping cylindrical
set parametric
set zrange[-60:0]
unset key
splot 'freqResp.dat' u 1:3:2 with pm3d

该脚本的几乎的做什么,我需要的,但不幸的是它仅使背部曲线的一半。前半仍然unplotted。例如:

This script almost does what I need, however unfortunately it only renders the back half of the graph. The front half remains unplotted. For example:

柜面有人幻想与上面的脚本玩弄,我已经把'freqResp.dat'文件的这里

Incase anybody fancies playing around with the script above, I've put the 'freqResp.dat' file is here.

当我绘制相同的文件,我原来的剧本,我得到下面的(因此,所有的数据都在freqResp.dat文件present)的图像:

When I plot the same file with my original script, I get the image below (so all the data is present in the freqResp.dat file):

任何人可以帮助我,让gnuplot的渲染前面的图的一半? 感谢戴夫。

Can anybody help me with getting gnuplot to render the front half of the graph? Thanks Dave.

推荐答案

在从几个用户的帮助,最后的答案是:

After help from several users, the final answer is:

reset
set title "3D version using cylindrical coordinate system"
set ticslevel 0.0
set view 30,56,0.98
set angles degrees
set mapping cylindrical
set parametric
set zrange[-60:0]
unset key
set pm3d depthorder 
splot 'freqResp.dat' u 1:3:2 with pm3d

感谢所有谁帮助

Thanks to all who helped

这篇关于如何创建一个3D极图,gnuplot的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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