Weird vertical lines with plot function

Dear all,
While trying to plot a specific dataset, I encouter a weird behavior:
load elpenon
figure; scatter(elpenon(:,1)*1000,elpenon(:,3),10,'k')
gives the appropriate plot
However, when calling :
figure; plot(elpenon(:,1)*1000,elpenon(:,3))
Warning: Graphics acceleration hardware is unavailable. Graphics quality and performance might be diminished. See MATLAB System Requirements.
I obtain this :
These weird vertical lines appears. No data support this as shown in the scatter plot.
max(elpenon(:,3))=-1.3800
so nothing above 0 but stil shown in the plot
changing linejoin properties does not solve the issue. The plot although is correct when setting linewidth to .1.
When using the pan tool in the figure window to move the plot around, the vertical lines diseappear when the origin of the extra line is outside of the x and y lims.
Can anyone explain this and propose a workaround?
Thanks

댓글 수: 3

Stephen23
Stephen23 2026년 5월 22일 13:02
편집: Stephen23 2026년 5월 22일 13:03
What OS ?
version
ans = '26.1.0.3203278 (R2026a)'
S = load('elpenon.mat')
S = struct with fields:
elpenon: [3594×3 double]
M = S.elpenon
M = 3594×3
12.0700 0 -4.5500 12.1100 0.4000 -3.5100 12.1600 0.8000 -4.0400 12.2000 1.2000 -4.6700 12.2500 1.6000 -4.9600 12.2900 2.0000 -5.3800 12.3400 2.4000 -5.0600 12.3800 2.8000 -5.3200 12.4300 3.2000 -5.3900 12.5200 4.0000 -5.3000 12.5600 4.4000 -5.1700 12.6100 4.8000 -5.3100 12.6500 5.2000 -5.5400 12.7000 5.6000 -5.4400 12.7400 6.0000 -5.6800
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
scatter(M(:,1)*1000,M(:,3),10,'k')
plot(M(:,1)*1000,M(:,3))
Olivier
Olivier 2026년 5월 22일 13:09
Dear Stephen23
MacOS Tahoe V 26.4.1
Walter Roberson
Walter Roberson 2026년 5월 22일 18:47
Datapoint:
I obtain normal plots with R2025b on MacOS Intel Tahoe 26.5

댓글을 달려면 로그인하십시오.

답변 (1개)

Star Strider
Star Strider 2026년 5월 22일 12:58
I am unable to reproduce that here.
This appears to produce the expected result --
LD = load(' elpenon.mat')
LD = struct with fields:
elpenon: [3594×3 double]
elpenon = LD.elpenon;
figure
plot(elpenon)
grid
legend(compose('Column #%d', 1:size(elpenon,2)), Location='best')
figure
plot(elpenon(:,1)*1E+3, elpenon(:,3))
grid
.

카테고리

도움말 센터File Exchange에서 Scatter Plots에 대해 자세히 알아보기

제품

릴리스

R2026a

태그

질문:

2026년 5월 22일 12:39

댓글:

2026년 5월 22일 18:47

Community Treasure Hunt

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

Start Hunting!

Translated by