line thickness issue, LineWidth acts as an integer

29 ビュー (過去 30 日間)
Mohsen
Mohsen 2016 年 7 月 20 日
回答済み: dpb 2016 年 7 月 20 日
when I use
plot(x,y,'LineWidth',lw)
and lw is less than 1.49 I get a thin line and when it is 1.50 or higher I get a thick line (thicker than I want). My understanding is that lw is a scalar, but here it is as if it is getting rounded to the nearest integer. Somehow I am not able to fine tune thickness this way. Any suggestions? I am using Matlab 2008a.

採用された回答

dpb
dpb 2016 年 7 月 20 日
There's inevitable granularity owing to the screen being finite number of pixels. For a default figure here, the resolution works out for the display area that height is 342 pixels or 3.56 inches or roughly 95 pixels/inch. A point (linewidth units) is 1/72" so there's roughly 72/95 --> 0.758 pixels/point so rounding will cause the finite jumps in renderable line widths. That's just limitation of hardware; higher resolution the monitor, the better, of course, but it's not continuously variable in representation even though the math computation is much more precise.

その他の回答 (1 件)

J. Webster
J. Webster 2016 年 7 月 20 日
as far as I know the only available line widths are 0.5, 1.0, 2.0, 3.0, 4.0 etc...I suspect it's a floating point to accommodate the 0.5 width. In my experience though, there usually isn't a difference between 0.5 and 1.0.

カテゴリ

Help Center および File ExchangeGraphics Object Programming についてさらに検索

タグ

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by