Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: linewidth control
Date: Tue, 17 Mar 2009 02:15:04 +0000 (UTC)
Organization: University of Memphis
Lines: 22
Message-ID: <gpn138$sek$1@fred.mathworks.com>
References: <gpkcqt$9n5$1@fred.mathworks.com> <gpm885$s28$1@fred.mathworks.com>
Reply-To: <HIDDEN>
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 1237256104 29140 172.30.248.37 (17 Mar 2009 02:15:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 17 Mar 2009 02:15:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 233092
Xref: news.mathworks.com comp.soft-sys.matlab:525399


"Miroslav Balda" <miroslav.nospam@balda.cz> wrote in message <gpm885$s28$1@fred.mathworks.com>...
> "Godzilla " <godzilla@tokyo.edu> wrote in message <gpkcqt$9n5$1@fred.mathworks.com>...
> > Is it possible to more accurately control the linewidth of a plotted line? 
> > 
> > I would really like to scale the width of the line to some fraction of the x-axis tick marks.   For example, my ticks are 1-second spacing and I want draw a line whose width corresponds to 100 msec.  
> 
> Hi,
> One solution is here:
> 
> lw = 0.1;     %   linewidth in seconds
> set(gca,'Units','pixels');
> xlim = get(gca,'XLim');
> dt = xlim(2)-xlim(1);          % displayed time in seconds
> pos = get(gca,'Position');
> w = (pos(3)-pos(1))/dx*lw;
> plot(t,fun(t),'Linewidth',w);
> 
> Hope it hepls.
> 
> Mira

Thanks.  Just what I was looking for.