在gnuplot中绘制轴对齐边界框(AABB)

在gnuplot中绘制轴对齐边界框(AABB),gnuplot,Gnuplot,我已经绘制了两个向量(3,3,2),(2,2,1),并希望在第一个向量上添加一个AABB 显示第二个向量在第一个向量的边界内 将设置对象矩形从屏幕0,0添加到屏幕3,3 front不起作用。 那么我如何绘制AABB(或者是a=3,b=3,c=2的长方体) 另外,如何将y轴的刻度置于左侧 仍然打开: 将y轴比例限制在左侧,将x轴比例限制在前下方 向x、y和z轴添加箭头 删除第二个x轴和y轴,以便每个轴只剩下一个 Gnuscriptresource\u vec\u aabb set xyplan

我已经绘制了两个向量(3,3,2),(2,2,1),并希望在第一个向量上添加一个AABB 显示第二个向量在第一个向量的边界内

设置对象矩形从屏幕0,0添加到屏幕3,3 front
不起作用。 那么我如何绘制AABB(或者是a=3,b=3,c=2的长方体)

另外,如何将y轴的刻度置于左侧

仍然打开:

  • 将y轴比例限制在左侧,将x轴比例限制在前下方
  • 向x、y和z轴添加箭头
  • 删除第二个x轴和y轴,以便每个轴只剩下一个
Gnuscriptresource\u vec\u aabb

set xyplane 0
set grid

set xrange [0:5]
set yrange [0:5]
set zrange [0:5]


splot 'resource_vec_aabb.dat' with vectors filled head lw 2
数据资源向量aabb.dat

# Gnuplot .dat file for vectors
0   0   0   3   3   2
0   0   0   2   2   1

更新

set termoption dashed   #Needs to be set to draw dashed lines

set border 19           #To set axis (1 + 2 + 16). See: set border help
set xyplane 0
set grid
unset key

my_range = 4

set xrange [0:my_range]
set yrange [0:my_range]
set zrange [0:my_range]

set arrow from graph 0,0,0 to graph 1.05,0,0 size screen 0.025,15,60 \
    filled ls 1 linecolor rgb "black"
set arrow from graph 0,0,0 to graph 0,1.05,0 size screen 0.025,15,60 \
    filled ls 1 linecolor rgb "black"
set arrow from graph 0,0,0 to graph 0,0,1.05 size screen 0.025,15,60 \
    filled ls 1 linecolor rgb "black"

set xtic 1
set ytic 1
set ztic 1

# AABB for 3,3,2
set arrow from 3,0,0 to 3,3,0 nohead linetype 2 linecolor rgb "green"
set arrow from 3,3,0 to 3,3,2 nohead linetype 2 linecolor rgb "green"
set arrow from 0,3,0 to 3,3,0 nohead linetype 2 linecolor rgb "green"
set arrow from 0,3,2 to 3,3,2 nohead linetype 2 linecolor rgb "green"
set arrow from 0,3,0 to 0,3,2 nohead linetype 2 linecolor rgb "green"
set arrow from 0,0,2 to 0,3,2 nohead linetype 2 linecolor rgb "green"
set arrow from 0,0,2 to 3,0,2 nohead linetype 2 linecolor rgb "green"
set arrow from 3,0,0 to 3,0,2 nohead linetype 2 linecolor rgb "green"
set arrow from 3,0,2 to 3,3,2 nohead linetype 2 linecolor rgb "green"

# 2,2,1
set arrow from 2,0,0 to 2,2,0 nohead linetype 2 linecolor rgb "blue"
set arrow from 0,2,0 to 2,2,0 nohead linetype 2 linecolor rgb "blue"
set arrow from 2,2,0 to 2,2,1 nohead linetype 2 linecolor rgb "blue"
set arrow from 0,0,1 to 2,0,1 nohead linetype 2 linecolor rgb "blue"
set arrow from 0,0,1 to 0,2,1 nohead linetype 2 linecolor rgb "blue"
set arrow from 0,2,1 to 2,2,1 nohead linetype 2 linecolor rgb "blue"
set arrow from 2,0,1 to 2,2,1 nohead linetype 2 linecolor rgb "blue"
set arrow from 2,0,0 to 2,0,1 nohead linetype 2 linecolor rgb "blue"
set arrow from 0,2,0 to 0,2,1 nohead linetype 2 linecolor rgb "blue"

set view 40,44,1
splot 'resource_vec_aabb.dat' with vectors filled head lw 2
新输出

# Gnuplot .dat file for vectors
0   0   0   3   3   2
0   0   0   2   2   1