White space at the ends of some plots and bars
37 views (last 30 days)
Show older comments
An intermittant problem is that I give matlab a couple vectors to plot, where x is of known length and y matches. But it tacks on some extra white space to the right of the plot - blank.
This is not helpful when trying to line up plots in registration for comparisons, and I see no parameter anywhere to force it.
Any advice appreciated. Hope it is not a dumb question. I am not a matlab expert (yet).
1 Comment
Fangjun Jiang
on 28 Oct 2011
Only if you could clearly explain or illustrate what do you mean by "But it tacks on some extra white space to the right of the plot - blank."
Accepted Answer
the cyclist
on 28 Oct 2011
Edited: the cyclist
on 25 Sep 2017
In your case, it sounds like you want to set the limits of the x- and y-axis. You can do that like this:
>> set(gca,'XLim',[0 10],'YLim',[0 10])
More Answers (0)
See Also
Categories
Find more on 2-D and 3-D Plots 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!