|
"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
|