You can use the xlim
and ylim
functions to set the limits of the x- and y-axes, respectively. To stay on the zoomed-in plot, you can use the hold
function to prevent the plot from being cleared before the next command is executed. Here's an example:
main.m503 chars25 lines
This will plot the data, zoom in on the region from x=2 to x=4 and y=-0.5 to y=0.5, add a marker at x=2.5 to show the zoomed-in location, and label the marker with some text.
gistlibby LogSnag