why is there a random line extending outside plot boundaries?
显示 更早的评论
When I plot the required data, there is a vertical line, which doesn't correspond to any values from input data and extends outside the plot boundaries (which I guess suggests it isn't an issue with the data itself). This did not happen in past versions of MATLAB but has persisted since updating to R2026a.
The code used is:
figure;
plot(TzedakisEtAl2018_FinalD18O_d13CStack.StackAge,TzedakisEtAl2018_FinalD18O_d13CStack.StackD18O___);
The x and y input data are from Columns 2 and 4 of Sheet 7 of the attached file, respectively.
3 个评论
dpb
about 14 hours 前
Is this repeatable if you restart MATLAB or just a one-time aberration? If it is repeatable, post a minimal working example that reproduces the symptoms on your system so it can be seen if that can be reproduced since your supposition that it isn't actually coming from the data itself seems to be confirmed by @Star Strider here.
You could see if findall can uncover a spurious graphics object in the figure. If all else fails, this is then probably a candidate for a support ticket to see if MathWorks can reproduce the issue; if not it is likely a graphics driver issue of some sort.
Hi @Kimberley
About 2½ years ago, a user experienced a similar issue, and @Adam Danz diagnosed it as possibly being related to a bug in the OpenGL renderer. For details, please refer to this thread:
You may also want to check the output returned by rendererinfo() for troubleshooting purposes.
ax = gca();
r = rendererinfo(ax)
r.Details
If I remember correctly, MATLAB now uses the WebGL renderer, and has at least since R2025a.
rendererinfo
.
回答(1 个)
figure
imshow(imread('Screenshot 202... 19.22.50.png'))
T1 = readtable('Tzedakis et al 2018.xlsx', Sheet=7, VariableNamingRule='preserve')
VN = T1.Properties.VariableNames
x = T1.(2);
y = T1.(4);
figure
plot(x, y)
% grid
xlabel(VN{2})
ylabel(VN{4})
It's not clear to me how you read the file, since only the plot call is presented. I'm not certain what could have caused the vertical line.
I cannot reproduce that error in R2026a using the provided data.
.
类别
在 帮助中心 和 File Exchange 中查找有关 Graphics Performance 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

