Main

# 3D vector problem

#### Contents

Graph 3D Vectors

The important thing is the vector data is in the form {$x\;y\;z\;\Delta x\; \Delta y\;\Delta z\;$} or in other words, the starting point and then the offset. This is not the way arrows work when entered with 'to.'

set xrange[-3:7]
set yrange[-3:7]
set zrange[-3:7]
set xzeroaxis lt 0
set yzeroaxis lt 0
set zzeroaxis lt 0
set xyplane at 0
set title "Problem Set 1.1"
$va<<EOD 0 0 0 2 3 4 EOD$vb<<EOD
0 0 0 -1 3 -2
EOD
$vc<<EOD 0 0 0 1 6 2 EOD$vd<<EOD
2 3 4 -1 3 -2
EOD
$ve<<EOD -1 3 -2 2 3 4 EOD set view equal xyz 70, 329 splot$va with vectors lt 2 lw 3 t 'A', \
$vb with vectors lt 6 lw 3 t 'B', \$vc with vectors lt 7 lw 3 t 'A+B', \
$vd with vectors nohead lt 1 dt 3 lw 1 t '', \$ve with vectors nohead lt 1 dt 3 lw 1 t ''



Sources:

Williams, Thomas. Colin Kelley. Gnuplot Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley. Many machine generated graphs have been manually enhanced by Laurence Eighner Hexamer.
Darth Kule. Produced by GNUPLOT 4.4 patchlevel 0, background spectrum based on http://commons.wikimedia.org/wiki/File:Linear_visible_spectrum.svg Dedicated to the public domain by the author.

Recommended:

Categories: Gnuplot Recipes

Tags:

This is a student's notebook. I am not responsible if you copy it for homework, and it turns out to be wrong.