ssa2
ssa2

Reputation: 77

How to hide the lines of a graph in MATLAB so that they do not extend beyond the frame

Is there any way to hide the overflow so that the lines don't protrude from the frame as in the attached image?

plot(sin(0:0.1:10),"LineWidth",10)

enter image description here

Upvotes: 4

Views: 178

Answers (1)

Wolfie
Wolfie

Reputation: 30046

You can set the axes clipping style to rectangle

plot(sin(0:0.1:10),"LineWidth",10);
set( gca, 'ClippingStyle', 'rectangle' );

plot

Upvotes: 4

Related Questions