How to scale a plot to fit a plot window without white end

22 ビュー (過去 30 日間)
Benjamin Lemmer
Benjamin Lemmer 2019 年 1 月 11 日
コメント済み: madhan ravi 2019 年 1 月 11 日
Whenever I plot data, there is some white space left on the right end. Is there a command to scale the plot all over the plot box ? In this case make the x-Axis show the data from 0-260
x = 0:260; % Create Data
y = rand(size(x)); % Create Data
figure(1)
plot(x, y)
I already tried axis([0 259 min(y) max(y)]); but this did not help

採用された回答

madhan ravi
madhan ravi 2019 年 1 月 11 日
xlim([0 260])
  2 件のコメント
Benjamin Lemmer
Benjamin Lemmer 2019 年 1 月 11 日
Thanks a lot. :-)
madhan ravi
madhan ravi 2019 年 1 月 11 日
Anytime :)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeExploration and Visualization についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by