How to plot months on x-axis with different length of values on y-axis?

Hello everyone!I would like to plot on matlab the results of a power plant .i have the power output of the plant, in a matrix of (1*8760) values for every hour of the year and i would like to plot it with x-axis depicting hours with the below formula:
January=1
February=745
March=1417
April=2161
May=2881
June=3625
July=4345
August=5089
September=5833
October=6553
November=7597
December=8017
The values of each month depicts the first hour of the month and i would like the x-axis to show only the month name and not the value of hours.

1 件のコメント

santhosh kumar
santhosh kumar 2021 年 7 月 7 日
I also need this help .if you have answer means please let me know

サインインしてコメントする。

回答 (1 件)

randerss simil
randerss simil 2021 年 2 月 15 日
編集済み: randerss simil 2021 年 2 月 15 日
%if true
M = {'January' 'February' 'March' 'April' 'May' 'June' 'July' 'August' 'September' 'October' 'November' 'December'}
xticklabels(M)
% end

カテゴリ

ヘルプ センター および File Exchange2-D and 3-D Plots についてさらに検索

質問済み:

2021 年 2 月 15 日

コメント済み:

2021 年 7 月 7 日

Community Treasure Hunt

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

Start Hunting!

Translated by