how to change the xmarkings of graph

2 次查看(过去 30 天)
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

采纳的回答

Image Analyst
Image Analyst 2018-4-2
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.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Line Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by