Main

# 2D vector problem

#### Contents

Graph 2D Vectors

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

set xrange[-15:15]
set yrange[-10:10]
set xzeroaxis lt 8
set yzeroaxis lt 8
set ylabel "Y"
set zlabel "Z"
set view equal xy
set key samplen 4
set title "Problem Set 1.1"
set grid xtics ytics
$va<<EOD 0 0 2 3 EOD$vb<<EOD
0 0 -1 3
EOD
$vc<<EOD -1 3 2 3 EOD$vd<<EOD
2 3 -1 3
EOD
$ve<<EOD 0 0 1 6 EOD plot$va with vectors lt 6 lw 3 t 'A', \
$vb with vectors lt 7 lw 3 t 'B', \$ve with vectors lt 5 lw 3 t 'A+B', \
$vc with vectors nohead dt 3 lt 1 lw 1 t '', \$vd with vectors nohead dt 3 lt 1 lw 1 t ''



Sources:

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.

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.

Recommended:

Categories:

Tags:

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