Vector
Main

2D vector axis


Contents

Graph 2D Vectors Axis

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[-2:5]  
set yrange[-1:5]  
set xzeroaxis lt 8  
set yzeroaxis lt 8  
set view equal xy
set key samplen 4
set title "After Figure 1.1"
unset border
unset tics
unset xtics
unset ytics
set tics axis 
set format y ""
set format x ""
set grid 
$va<<EOD
0 0 -1 2 
EOD
$vb<<EOD
0 0 4 2 
EOD
$vc<<EOD
0 0 3 4
EOD
$vd<<EOD
-1 2 4 2
EOD
$ve<<EOD
4 2 -1 2
EOD
plot $va with vectors lt 6 lw 3 t 'w', \
         $vb with vectors lt 7 lw 3 t 'v', \
         $vc with vectors lt 5 lw 3 t 'w+v', \
         $vd with vectors nohead dt 3 lt 1 lw 1 t '', \
         $ve 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: Gnuplot Recipies

Tags:


edit

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

Backlinks

This page is GnuplotRecipe5