How to plot Gantt Chart for job shop scheduling?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Does anyone know, how to plot Gantt Chart for Job shop scheduling using barh function in Matlab. Please help me to figure out a way to solve this or give some guidance for the same. Thanks in advance.
0 Kommentare
Antworten (2)
Stijn Haenen
am 4 Dez. 2019
Do you mean something like this:
Number_of_tasks=20;
width=200/Number_of_tasks;
startDates=1:20;
endDates=3:22;
for i=1:Number_of_tasks
plot([startDates(i),endDates(i)],[Number_of_tasks+1-i,Number_of_tasks+1-i],'b','Linewidth',width)
hold on
end
labels=['a';'b';'c';'d';'e';'f';'g';'h';'i';'j';'k';'l';'m';'n';'o';'p';'q';'r';'s';'t'];
set(gca,'YTickLabel',labels)
Alexis Wang
am 30 Aug. 2022
I just published Gantt chart on File Exchange: https://www.mathworks.com/matlabcentral/fileexchange/116970-gantt-chart?s_tid=srchtitle.
It uses patch instead of barh though, and draws each bar for every task. However, the user just needs to pass in tasks and other time data to plot a Gantt chart (details in the link above). Feel free to let me know if you have any questions. Hope that helps!
0 Kommentare
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!