Help wit contour plotting
Foehn
foehn at gmx.at
Sun Dec 2 08:46:37 CST 2007
Hi all,
I am an octave novice, and I could not find the information I was
looking for in the octave manual and the FAQ-List. I want to print a
contour plot as an example that is good for publication.
My example script is:
%=====================================================
% Using octave 2.9.12 with gnuplot 4.2 patchlevel 0
% on Ubuntu Linux 7.10
%
% Vers. 0.1, (p) by Foehn, 2007-12-02
%
% Example of an isoline plot of a
% 2-dimensional gaussian bell function to
% demonstrate the isoline plot routine of octave
% Missing: definition of the isoline distance (e.g. 0:0.05:1),
% every 4th isoline thicker and value-labeling of the "thick"
% isolines.
%
clear all; close all;
[x,y]=meshgrid(linspace(-2,+2,100),linspace(-2,+2,100));
z=exp(-(x.*x+y.*y));
contour(x,y,z)
axis ([-2, +2, -2, +2], "square");
grid on;
title("2D-Gaussian Bell Function");
xlabel("x");ylabel("y");
%print ("cont.eps","-depsc")
%======================================================
I need a decent black and white graphic with well defined and labeled
isolines; e.g. dashed and thin isloines every 0.05 units and thick and
solid isolines with value label.
As a perfect add-on I would need "H" or "L"-Labels at local maxima or
minima of the function.
Can anybody help me?
Thanks,
Foehn
More information about the Help-octave
mailing list