Created
August 20, 2021 07:18
-
-
Save jkrumbiegel/94b711a379cad0dcfa80c79ccbcc33e9 to your computer and use it in GitHub Desktop.
makie gantt bar chart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task_starts = [0, 3, 5, 10] | |
task_ends = [3, 6, 9, 12] | |
task_positions = [1, 2, 1, 2] | |
barplot(task_positions, task_ends, fillto = task_starts, | |
direction = :x) | |
text!("task " .* string.(1:4), | |
position = Point2f0.( | |
(task_starts .+ task_ends) ./ 2, | |
task_positions | |
), | |
color = :white, | |
align = (:center, :center) | |
) | |
current_figure() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment