Setting axis limits of a plot

4 ビュー (過去 30 日間)
Matt
Matt 2011 年 7 月 4 日
I have two sets of data, x and y which I am plotting together:
plot(x,y)
I'm having a problem setting the axis limits however. I am using the method shown in the online documentation:
axis([xmin,xmax,ymin,ymax])
Or in my case:
axis([1,1024,1,1024])
The problem is when I enter this it creates a new figure with the correct limits but with no data plotted.

採用された回答

Paulo Silva
Paulo Silva 2011 年 7 月 4 日
axis(gca,[1,1024,1,1024])
or
ax=axes
plot(x,y)
axis(ax,[1,1024,1,1024])
  3 件のコメント
Paulo Silva
Paulo Silva 2011 年 7 月 4 日
set(gca,'ydir','reverse')
C.J. Harris
C.J. Harris 2011 年 7 月 4 日
or simply:
axis ij

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

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by