how to define multiple scales for x axis in one graph

조회 수: 3 (최근 30일)
farnaz hadian
farnaz hadian 2021년 4월 22일
답변: AKennedy 2024년 5월 15일
Hi,I want to define x axis with multiple scales for different time ranges in the same axis in one graph. for example
0 to 5 minutes to be shown in a 1-minute interval,
5 to 20 minutes: 5-minute interval
20 to 100 minutes: 15-minute interval
100 to the end: 1-minute interval.
I tried to seperate data and define intervals for them seperately by using tilespacing and xTick functions, but I don't know how to keep all the intervals at the same time.
I went through the foroum but couldn't find something similar.
  댓글 수: 2
Dyuman Joshi
Dyuman Joshi 2021년 4월 23일
Not sure if I understand what you can actually want, but try this
xticks([0:4 5:5:20 20:15:100 100:end_value])
farnaz hadian
farnaz hadian 2021년 4월 23일
many thanks for your comment, I think I couldn't explain it well. This function would define different intervals as requested, but at the same scale. I'd like to have different scales in each interval on an x axis. What I want is something like semilogarithmic graph but with defind intervals.

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

답변 (1개)

AKennedy
AKennedy 2024년 5월 15일
Hi Farnaz,
The "addaxis" allows you to add multiple axes to you figure.

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by