Reputation: 11
I have a 3D dataset consisting of 3 columns that are: radius (it's an angular variable going from 0 to 90 degrees), azimuthal angle and a function (called T) dependent on both radius and azimuth. For each value of radius in the column I have the whole range of values of the azimuth from 0 to 2*pi, and in the third column the corresponding T function value.
I want to make a 2D polar plot, a heatmap that shows the "intensity" of T depending on the radius and the azimuth.The image 1 attached shows how the variables should be represented, and the image 2 is the corresponding heatmap in gray scale. 1 2 I have been trying also in GNUPLOT, but I never get the diagram I need. Anyone knows the way? Any advice about what direction to take would be appreciated.
**EDIT: I don't know if it's possible to attach a dataset file, but this would be a similar one (shortened): The three columns are r, θ, and T(r,θ). For every value of r radius, I want to go across the whole range of the azimuth from 0 to 2*pi (around 6 in radians), and then the third column is the value which i want to make the heatmap for.
0. 0. 5.00000284249414
0. 1. 5.00000284249414
0. 2. 5.00000284249414
0. 3. 5.00000284249414
0. 4. 5.00000284249414
0. 5. 5.00000284249414
0. 6. 5.00000284249414
1. 0. 3.567825199007075
1. 1. 5.667040835607859
1. 2. 6.066435899369931
1. 3. 3.620258279907404
1. 4. 5.228476464535639
1. 5. 6.387721052369126
1. 6. 3.775570161705905
2. 0. 3.351247019698203
2. 1. 5.782995557435527
2. 2. 6.255369591592488
2. 3. 3.410630384522823
2. 4. 5.267292704344917
2. 5. 6.6370705238320606
2. 6. 3.5870354029796603
3. 0. 4.956427159288734
3. 1. 5.018192922028904
3. 2. 5.02858888162984
3. 3. 4.9581591194569505
3. 4. 5.006358999209049
3. 5. 5.036713105661448
3. 6. 4.963218764930239
Upvotes: 0
Views: 218
Reputation: 15093
Your question does not provide enough information or sample data to provide an example that matches exactly, but perhaps this plot from the gnuplot demo collection is close enough to give you a next step. You can then modify the question to show what you have done and what is not working the way you would like. The original example is the 8th plot here: parametric plots.
Here is a stripped down version showing both a 3D representation and the 2D projection you get from set view map
.
#
# Decouple range of parametric axes u/v from that of display axes x/y/z
#
set label 1 "Decouple range of parametric axes u/v\nfrom that of display axes x/y/z"
set label 1 at screen 0.1, 0.9
unset colorbox
set palette cubehelix cycle 3
set view equal xyz
set view 120, 300
set xyplane 0
set pm3d depthorder
set border 4095
set tics scale 0
set format ""
set angles radians
xx(u, v) = cos(v) * cos(u)
yy(u, v) = cos(v) * sin(u)
zz(u, v) = sin(v)
color(u, v) = sin(2*u)+sin(2*v)
#
set parametric
set isosamples 121, 61
set samples 121, 61
set urange [-pi:pi]
set vrange [-pi/2:pi/2]
set xrange [-1:1]
set yrange [-1:1]
set zrange [-1:1]
splot "++" using (xx($1,$2)):(yy($1,$2)):(zz($1,$2)):(color($1,$2)) with pm3d notitle
Upvotes: 0