필터 지우기
필터 지우기

Problem with axes

조회 수: 1 (최근 30일)
Pablo
Pablo 2012년 1월 11일
Hi,
I made a figure with a subplot (4 rows and 2 columns, with a ylabel in each subplot). Then i wrote the following code:
% let centered title
set(gcf,'NextPlot','add');
axes;
h = title(tit);
set(gca,'Visible','off');
set(h,'Visible','on');
tith = get(gca,'Title');
set(tith,'Position',get(tith,'Position') + [0 .02 0]);
% put a single title in Y-axis
set(gcf,'NextPlot','add');
axes;
h = ylabel(ytit(end));
set(gca,'Visible','off');
set(h,'Visible','on');
ylabh = get(gca,'YLabel');
set(ylabh,'Position',get(ylabh,'Position') - [.03 0 0]);
zoom on
Well, my problem is i need to "zoom" on the subplots, but i think this applies in the last "axes", because subplots are not affected. I don't know what to do to apply the "zoom" to subplots.
Regards!

답변 (2개)

Andrew Newell
Andrew Newell 2012년 1월 11일
Just make each subplot the current plot and set zoom on, e.g.,
subplot(4,2,1)
zoom
See also the examples in the documentation for zoom for fancier customization of subplot zooms.
  댓글 수: 4
Pablo
Pablo 2012년 1월 11일
No.
Perhaps it's because i created 2 new axes after making subplot. I think it's a problem of "layers" (the axes i need aren't above the other axes).
Sorry, i don't know how to explain it more clearly xD
Andrew Newell
Andrew Newell 2012년 1월 17일
Your answer implies that you didn't try my suggested commands in a new figure.
MATLAB graphics doesn't have layers. When you use a command like subplot(4,2,1), that axis is "selected", i.e., commands like plot now apply only to that subplot, and h=gca returns the handle to that subplot.

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


Walter Roberson
Walter Roberson 2012년 1월 11일
zoom(AxisHandle, 'on')

카테고리

Help CenterFile Exchange에서 Visual Exploration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by