0
votes

I want to do a vector field plot with the vector arrows also depicted at the bottom just like in a surface contour plot using "set pm3d at b".

My file is given in the following format:

x  y  y  dx dy dz
1  0  2  4  3  1 
2  3  4  2  6  3
2  4  6  1  9  2
.  .  .  .  .  .

I have used this gnuplot script:

set style arrow 1 
set xrange[0.7:0.0]
set yrange[-0.4:0.4]
set zrange[-0.4:1.0]
set xtics (-0.7,-0.5,-0.33,-0.15,0.0,0.15,0.33,0.5,0.7) font "Times-Roman,18"
set ytics (-0.7,-0.5,-0.33,-0.15,0.0,0.15,0.33,0.5,0.7) font "Times-Roman,18"
unset ztics
set palette rgbformulae 30,31,32
set ticslevel 0
unset key
scale = 0.4
splot 'file.dat' u 1:2:3:($4*scale):($5*scale):($6*scale) w vectors arrowstyle 1

I also attached two 3d vector field plots with different views. What I actually want is a combination of both so that the contour of the plotted vectors should appear at the bottom (just like a top view using "set view 0,180" which is represented by the second image (top view) incorporated into the (side view) plot.

Vector_field_3d_plot_side_view enter image description here

Vector_field_3d_plot_top_view enter image description here

Since I havenĀ“t seen any gnuplot example for such a plot, I am not sure even if it is capable of doing it. If not, which software (Matlab, matplotlib,...) would you recommend me to use instead?

Thanks in advance!

I really appreciate any help!

Best wishes,

DaveS

1

1 Answers

0
votes

Since you know the zrange, you can simply do the projection yourself and set z to the minimum value of the z-axis and dz to zero:

set style arrow 1 
set xrange[0.7:0.0]
set yrange[-0.4:0.4]
set zrange[-0.4:1.0]
set xtics (-0.7,-0.5,-0.33,-0.15,0.0,0.15,0.33,0.5,0.7) font "Times-Roman,18"
set ytics (-0.7,-0.5,-0.33,-0.15,0.0,0.15,0.33,0.5,0.7) font "Times-Roman,18"
unset ztics
set palette rgbformulae 30,31,32
set ticslevel 0
unset key
scale = 0.4
splot 'file.dat' u 1:2:3:($4*scale):($5*scale):($6*scale) w vectors arrowstyle 1,\
    '' u 1:2:(-0.4):($4*scale):($5*scale):(0) w vectors as 1