Making the Y-axis a scale of a specific variable

조회 수: 1 (최근 30일)
Thinker
Thinker 2019년 12월 5일
답변: the cyclist 2019년 12월 5일
How to change the scale of values of the y-axis to a scalar multiple of a specific variable? (i.e. I want to make all values that appear on the y-axis scale as scalar multiples of a varaible "r"). Thank you.

채택된 답변

the cyclist
the cyclist 2019년 12월 5일
Here is one way:
r = 7;
m = 50;
N = 50;
x = rand(N,1);
y = m*rand(N,1);
figure
plot(x,y,'.');
set(gca,'YTick',0:r:max(y),'YTickLabel',0:r:max(y))
Screen Shot 2019-12-05 at 2.49.58 PM.png

추가 답변 (0개)

카테고리

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