필터 지우기
필터 지우기

Can someone help me change the properties of this subplot?

조회 수: 3 (최근 30일)
Sy
Sy 2012년 8월 7일
I used a loop to graph 192 subplots in a 8x24 grid.
I want to change the line color of data in a few subplots in the first row. How can this be done?
Basically, I am having trouble changing the properties of a subplot that has already been graphed...
  댓글 수: 2
Daniel Shub
Daniel Shub 2012년 8월 7일
Can you provide some simplified code showing your you generate your plots.
Sy
Sy 2012년 8월 7일
편집: Sy 2012년 8월 7일
if true
% code
end
for i = 1:1:24;
A = subplot(8,24,i+24*0);plot(cycles,hpprofFAM_rowA(:,i)');
ax = get(A,'Position');
ax(3) = 0.025;
ax(4) = .09;
set(A,'Position',ax,'XTickLabel','');
B = subplot(8,24,i+24*1);plot(cycles,hpprofFAM_rowB(:,i)');
ax = get(B,'Position');
ax(3) = 0.025;
ax(4) = .09;
set(B,'Position',ax,'XTickLabel','');
and so on...

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

답변 (2개)

Seyhan Emre Gorucu
Seyhan Emre Gorucu 2012년 8월 7일
A hint for you: Change the properties you want graphically. Then, go to file->generate code. This way, you can have the code to have the plot you want and you can repeat the same code for the other plots without having to change one by one.

Sean de Wolski
Sean de Wolski 2012년 8월 7일
figure;
for ii = 3:-1:1
subplot(1,3,ii);
h(ii) = plot(rand(1,10)); %store iith line handle
end
%Change second line to red
set(h(2),'color','r');

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by