필터 지우기
필터 지우기

How to plot several curves on the same figure with a repeating x-axis

조회 수: 2 (최근 30일)
I have a little problem. I would want to plot several curves on the same figure with a repeating x-axis but I don't know how. In attachment, you can see an example of a typical figure that I would like to obtain.
If you have any idea, I'm open.
Thank you

채택된 답변

Ameer Hamza
Ameer Hamza 2020년 11월 12일
Although not directly supported, you can modify the xticklabels to get something similar
x = linspace(0, 1);
y = x.^2;
figure()
axes();
hold on
plot(x, y);
plot(x+0.5, y);
plot(x+1.0, y);
plot(x+1.5, y);
xticklabels({'0', '0', '0', '0', '0.5', '1'})

추가 답변 (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