Gannt Chart from a .csv file
Show older comments
So I am trying to learn to use MATLAB for things I can do in Excel to improve my skills. I am wanting to make a Gannt chart for an up and coming project. I used the following table;
To produce this stacked bar chart following the guide found here https://www.officetimeline.com/make-gantt-chart/excel;

Is it possible to use the table I have created to make an identical chart in MATLAB.
So far my minimal progress has been;
>> Gannt = readtable('Gant example.csv');
>> Start = Gannt(:,1);
>> Task = Gannt(:,3);
>> Duration = Gannt(:,4);
%so I thought the next step would be:
>> barh(Start,Duration,'stacked')
%But then I got this error.
Error using bar (line 139)
Input arguments must be numeric, datetime, duration or categorical.
Error in barh (line 44)
h = bar(varargin{:});
Where have I gone wrong and what are the next steps?
Additionally, I'll have to make a lot of similar charts in the future, so is it possible to save such a code as a function?
Thank you in advance from this MATLAB beginner.
Accepted Answer
More Answers (0)
Categories
Find more on Data Type Identification in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!