|
From: Peter D. <pc...@wi...> - 2007-12-07 12:34:05
|
On Thu, Dec 06, 2007 at 02:37:01AM -0800, Thomas Sefzick wrote:
> works, but 'plot' would be better, so first 'splot' into a table and
> then use the resulting datafile as input:
There's another variaton, Thomas, that uses `set view map'; for
instance, to plot the contour map and gradient vector field of:
f(x, y) = sin(x) + sin(y)
try:
f(x, y) = sin(x) + sin(y)
set multiplot
set contour
set cntrparam level 10
set view map
set xrange [-6:6]
set yrange [-6:6]
unset surface
unset key
set isosamples 100,100
set samples 100,100
splot f(x, y)
unset contour
set isosamples 30,30
set samples 30,30
set surface
set key
l = 0.5
splot '+' using 1:2:(0.0):(l*cos($1)):(l*cos($2)):(0.0) with \
vectors title "f(x,y) = sin(x) + sin(y)"
See it here:
http://wikisophia.org/wiki/User:Danenberg#Vector_field
|