Clear Filters
Clear Filters

how to change the xmarkings of graph

2 views (last 30 days)
i have plotted a graph, i want its xlim to be from 3 to 7, mine is showing 1 to 5. When i do xlim([3 7]) only the last 3 values come. how to change the xmarkings

Accepted Answer

Image Analyst
Image Analyst on 2 Apr 2018
You did it right. When you call xlim([3 7]) only data values between x=3 and x=7 will be plotted. In your two plots, you are not plotting the same arrays. For example, you have values at x=4 for the left graph but not for the right graph, and the y values for x=5 on the left are nowhere close to the y values for x=5 on your right plot. Also your left graph has 3 curves while your right graph has 4 curves. But if you had plotted the same thing in both plots, it would have been correct.

More Answers (0)

Categories

Find more on Line Plots in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!