Plot data with months on X and numerical value on Y

Hello I have an excel file with column 1 as montly data in the fromat dec,jan,feb.... and the column 2 has sales value. I have imported this matlab. but how do i plot this in bar graph ?

回答 (1 件)

Eric Delgado
Eric Delgado 2022 年 10 月 5 日

0 投票

See image below...

5 件のコメント

Priyadarshan Priyadarshan
Priyadarshan Priyadarshan 2022 年 10 月 5 日
Thanks. I did that. But I have got some weird graph.
Adam Danz
Adam Danz 2022 年 10 月 6 日
What do you expect to see? Do you want 1 bar for each data point? Are you expecting to see 12 bars, one for each month? Or perhaps groups of bars by year? What's your goal?
Priyadarshan Priyadarshan
Priyadarshan Priyadarshan 2022 年 10 月 6 日
Ah my bad, the date format was wrong
Priyadarshan Priyadarshan
Priyadarshan Priyadarshan 2022 年 11 月 10 日
If the dates are in format mm-dd-yyyy hh:mm:ss vs value. How can I plot the graph for this? Could you please advise me on this
Adam Danz
Adam Danz 2022 年 11 月 10 日
if you are using datetime values, then it doesn't matter what date-time format they have when plotting. Are you asking about how to read-in datetime data.

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

コメント済み:

2022 年 11 月 10 日

Community Treasure Hunt

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

Start Hunting!

Translated by