Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!o21g2000vbl.googlegroups.com!not-for-mail
From: Brendan <brendandetracey@yahoo.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: contour plot with dashed linespec
Date: Tue, 8 Sep 2009 16:45:22 -0700 (PDT)
Organization: http://groups.google.com
Lines: 41
Message-ID: <b2ecbdf8-190b-4abd-a9d4-5a08a20f6e21@o21g2000vbl.googlegroups.com>
References: <h86ikc$cmq$1@fred.mathworks.com>
NNTP-Posting-Host: 142.68.95.237
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1252453523 1497 127.0.0.1 (8 Sep 2009 23:45:23 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 8 Sep 2009 23:45:23 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: o21g2000vbl.googlegroups.com; posting-host=142.68.95.237; 
	posting-account=B-TRNQoAAACbFTAQWrEB2ZKtNl2Jbw6S
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; 
	Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 
	3.5.30729; .NET CLR 3.0.30729),gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:569108


On Sep 8, 6:34 pm, "Paul Ullrich" <ayca...@gmail.com> wrote:
> 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?

Since you are not using colours, I presume you have the need to print
on a non-colour printer. Try using a different renderer for your
figures.
set(gcf, 'Renderer', 'painters')
set(gcf, 'Renderer', 'zbuffer')
set(gcf, 'Renderer', 'opengl')
Trying a different renderer can effect how dashed line patterns
appear. Try using zbuffer and then print -dpng -r300 myfig.png
Using painters with a postscript file can make dots appear very small
(iirc on windows at least).

Back in the day, being able to set customised dash line patterns was
one of the (very) few advantages of NCAR graphics. Wish Matlab could
do the same.