フィルターのクリア

shifting axis on both ends so graph does not have points on extreme end

2 ビュー (過去 30 日間)
Viswajit Talluru
Viswajit Talluru 2024 年 5 月 16 日
コメント済み: Star Strider 2024 年 5 月 16 日
I have the following attached graph and I need to shift the axis so that I do not have my starting point on the y axis and the last point on the extream end.

採用された回答

Star Strider
Star Strider 2024 年 5 月 16 日
imshow(imread('baseresistancemultiplot.jpg'))
One option is:
axis('padded')
That will put space between the elements of the plot and the axes —
x = [0 1];
y = [1 2];
figure
plot(x, y, '.-')
grid
figure
plot(x, y, '.-')
grid
axis('padded')
See the documentaion for the axis function for more options.
.
  2 件のコメント
Viswajit Talluru
Viswajit Talluru 2024 年 5 月 16 日
Thank you so much. I was looking for this command for hours.
Star Strider
Star Strider 2024 年 5 月 16 日
As always, my pleasure!

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

その他の回答 (1 件)

Adam Danz
Adam Danz 2024 年 5 月 16 日
In addition to axis padded which pads all axes limits, you could use ylim('padded') to only pad the y axis limits (same with xlim or zlim).

製品

Community Treasure Hunt

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

Start Hunting!

Translated by