필터 지우기
필터 지우기

Axis function seems non functional

조회 수: 1 (최근 30일)
Utsav
Utsav 2016년 1월 16일
답변: Image Analyst 2016년 1월 16일
I wish to plot 4 panels(June, July,August,September) of diurnal evolution of data x axis = 1 to 24 fine y axis = I set 45 130 as the data for all four months lie in thease extremums.
so I use function axis([1 24 45 130]) after plot function
However to my chagrin, the axes are chosen according to the datasets for each month and not the common y limit set by me
Any help will be appreciated.
  댓글 수: 1
Utsav
Utsav 2016년 1월 16일
I could solve it After plot immediately I need to put axis([a b c d]) command before anything else.
Dunno however why this ordering should matter!

댓글을 달려면 로그인하십시오.

채택된 답변

Image Analyst
Image Analyst 2016년 1월 16일
You can use axes() to set the current axes, then plot to it, then use xlim and ylim:
axes(handles.July);
x = 1 : 24;
y = linspace(45,130, length(x)); % Create sample data.
plot(x, y, 'bd-', 'LineWidth', 2, 'MarkerSize', 15);
xlim([1, 24]);
ylim([45, 130]);
grid on;
axes(handles.August);
x = 1 : 24;
% etc.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Graphics Object Programming에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by