How can i crop a figure
Show older comments
Hello I have a figure as a result of matlab code, it is like a map, large amount of data (lines and points) . but i do not need it all, i need only a part of it, so how can i crop this figure? any suggestions? thanks
3 Comments
KL
on 27 Jul 2018
Change axis limits according to your need
plot(1:10)
if you need only values 4 to 7
xlim([4 7])
Amgad Abuwarda
on 27 Jul 2018
N/A
on 27 Jul 2018
just look at your values and think about the area that you want to see
Answers (2)
Alex Fratila
on 27 Jul 2018
0 votes
To expand on the above answer, in addition to xlim, ylim is also an option, or you can wrap both together with the axis function. Check out this page for examples!
Kelly Kearney
on 27 Jul 2018
0 votes
Just to clarify, when you say "like a map", you don't mean it's a map axis (Mapping Toolbox), do you? Cropping a map axis is much more complicated than just changing the x/y limits in a standard axis.
Categories
Find more on Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!