Dating the X-axis of a plot

조회 수: 1 (최근 30일)
Thishan Dharshana Karandana Gamalathge
답변: Ahmed raafat 2017년 7월 30일
I have a date set of size 31x24 for each of November, December, January, February (I have filled non existing dates with NaN, for an example November 31st). That is hourly data for those months. When I make a figure, X-axis represents each hour. But I want to have a tick mark for each day, that is once in every 24 values of X-axis so that the reader can clearly identify the day number. Better if I can have day number for sections of 24 hours, and then show the month for once in every 31 days. No need to worry about non-existing days such as November 30th, as it will be shown empty on the figure.
Thanks.
  댓글 수: 1
dpb
dpb 2017년 7월 28일
편집: dpb 2017년 7월 29일
What is wrong with the Answer <Answer_275212> to the previous (almost identical) question? Why don't you follow up on open Questions instead of just disappearing to pop up again somewhere else with the same question?
ADDENDUM
More than glad to try to help but frustrating when don't hear back and then the same problem arises again later...
If what you're now describing is to have a month label at mid-month and only date labels at the tick values, you'll probably have to go to one of two options:
  1. Use the day labelling scheme I demonstrated previously and then use text to write the month name where wanted, or
  2. Use two x-axes with the one as above in days and the other with the same date range but ticks only at mid-month dates and zero y-axis height to not show but with the month format only.

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

채택된 답변

Ahmed raafat
Ahmed raafat 2017년 7월 30일

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by