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 ?

Answers (1)

See image below...

5 Comments

Thanks. I did that. But I have got some weird graph.
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?
Ah my bad, the date format was wrong
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
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.

Sign in to comment.

Commented:

on 10 Nov 2022

Community Treasure Hunt

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

Start Hunting!