필터 지우기
필터 지우기

Changing proportion of y axis

조회 수: 1 (최근 30일)
Maddie
Maddie 2011년 8월 3일
Hey guys;
how do you change the units of one of the axes without changing the proportion of your graph? so, for example, say i had it in units of hours and i wanted to show it in minutes instead. How would I do that?

답변 (2개)

Friedrich
Friedrich 2011년 8월 3일
Hi,
I would start with something like this:
h = plot(1:10);
set(h,'YData',get(h,'YData')*60)
So you change the actual Y data of the plotted data, which leads to a refresh of the plot.

Jan
Jan 2011년 8월 3일
I assume you want to set the X-limits for a kind of zooming:
x = rand(1, 1000);
ax1 = subplot(2, 1, 1);
plot(1:1000, x);
ax2 = subplot(2, 1, 2);
plot(1:1000, x);
pause(2);
set(ax2, 'Xlim', [1, 100]);

카테고리

Help CenterFile Exchange에서 2-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