Path: news.mathworks.com!not-for-mail
From: "Paul Ullrich" <aycarus@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: contour plot with dashed linespec
Date: Tue, 8 Sep 2009 21:34:04 +0000 (UTC)
Organization: University of Michigan
Lines: 18
Message-ID: <h86ikc$cmq$1@fred.mathworks.com>
Reply-To: "Paul Ullrich" <aycarus@gmail.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1252445644 13018 172.30.248.37 (8 Sep 2009 21:34:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 8 Sep 2009 21:34:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1972219
Xref: news.mathworks.com comp.soft-sys.matlab:569084


Hi all,

I've recently been plotting fluid flows using MATLAB's contour command and wanted to separately identify contour lines of positive and negative using solid and dashed linespec, respectively.  I have been using the following command to do so:

contour(Lon, Lat, Ubig, 'LevelList', 1e-5*[1:2:15], 'LineColor', 'black', 'ShowText', 'off');
hold on;
contour(Lon, Lat, Ubig, '--', 'LevelList', 1e-5*[-15:2:-1], 'LineColor', 'black', 'ShowText', 'off');
hold off;

However, using these commands the negative contour lines actually appear solid in my plots:

http://www-personal.umich.edu/~paullric/BadPlot.png

I can use : as a linespec instead, in which case I get

http://www-personal.umich.edu/~paullric/DotPlot.png

which at least lets me identify the negative regions, but is harder to read.  Is there any way I can fix this?