Skip to content

Instantly share code, notes, and snippets.

@jkrumbiegel
Created August 20, 2021 07:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jkrumbiegel/94b711a379cad0dcfa80c79ccbcc33e9 to your computer and use it in GitHub Desktop.
Save jkrumbiegel/94b711a379cad0dcfa80c79ccbcc33e9 to your computer and use it in GitHub Desktop.
makie gantt bar chart
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