change start point of plot

조회 수: 29 (최근 30일)
Nurul Ain Basirah Zakaria
Nurul Ain Basirah Zakaria 2021년 2월 16일
답변: Cris LaPierre 2021년 3월 3일
Hi how can I change the Jan to start at 0?

채택된 답변

Cris LaPierre
Cris LaPierre 2021년 3월 3일
You can change the first point's y value from 105 to 0.
d=datetime(2020,1,1):calmonths:datetime(2020,12,1);
y = randi(160,[1,12])+100;
M = month(d,'shortname');
plot(categorical(M,M),y)
% change the first point to 0
y(1)=0;
plot(categorical(M,M),y)

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by