how to create a 3d polar graph with gnuplot
I'm investigating the frequency responses of microphones.
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).
I've written a gnuplot script that will graph all this data into a 3d graph:
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
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?
Thanks in advance. Dave.
Update 26-April-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
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:
Incase anybody fancies playing around with the script above, I've put the 'freqResp.dat' file is here.
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):
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
链接地址: http://www.djcxy.com/p/70996.html上一篇: 以数组形式获得pybrain预测的输出
下一篇: 如何用gnuplot创建一个三维极坐标图