One plot line is messing up the two other plot lines/points
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
My second plot() command is messing up the other two plot() commands from displaying properly.




0 Kommentare
Antworten (1)
Steven Lord
am 22 Sep. 2025
In your second plot, the Y axis limits are 0 and 4. Your data points for your first and third lines all have Y coordinates in that interval.
In your first plot, note that the Y axis has a little "x10^5" above it. That means the Y axis limits are 0 and 1200000. The data points from your second line span that range. The points from your first and third lines only take up a very small portion of that range, meaning those lines are essentially indistinguishable from the line Y = 0.
As an analogy, if you had $1.2 million, would you care about spending an extra $4? Or would that be something where you'd say "Sure, whatever, that's small change."
This is not a bug. This is "Your data spans too wide a range to show them both on a linear Y axis plot and see the fine details of all the lines."
You could try setting the Y axis to logarithmic scale using semilogy instead of plot. Note that straight lines (linear data) don't appear straight in log scale.
x = 1:100;
plot(x, x)
title('Linear Y scale')
figure
semilogy(x, x)
title('Logarithmetic Y scale')
Siehe auch
Kategorien
Mehr zu Annotations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

