Is '.-' no longer a valid line format for plots?

조회 수: 3 (최근 30일)
the cyclist
the cyclist 2011년 9월 7일
Formerly, the command
>> plot(1:10,'.-')
created a LineStyle with prominent dots as markers, connected by lines. In 2011b (on a Mac), there are no dots. I have to increase the MarkerSize property of the line to get the dots to show.
Bug, or feature? I didn't find mention of this change in the Release Notes.

채택된 답변

the cyclist
the cyclist 2011년 12월 5일
I ultimately contacted MathWorks support for this question, and found the definitive answer.
It turns out that for my high-resolution monitor, the "ScreenPixelsPerInch" had a default value of 72, which was causing the plot symbols to be rendered in a way that they did not show up on the screen. The dots "existed", but were not rendered visibly on the monitor. (They did show up in the saved/printed output.)
I was able to fix the issue by slightly increasing the value of ScreenPixelsPerInch:
>> set(0,'ScreenPixelsPerInch',76)
I put that line in my startup.m file, and all is well.

추가 답변 (1개)

Junaid
Junaid 2011년 12월 4일
Dear Sir,
I am not sure for older versions. You still can use this format for line and marker in plots.
plot(1:10,'.-') % is straight line
plot(1:10,'.--')% is ------ kind of line
plot(1:10,'.-.')% is o-.-o, where o is your data point.
I hope, I understood your point well :-)

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by