[ad_1]
O código de Jeremy Yoder para um gráfico simples de Gantt no blog Molecular Ecologist usa geom_line e reunir para preparar a estrutura de dados. Eu gosto de usar geom_linerange e um coord_flip, que permite usar as colunas inicial e final diretamente sem girar.
Aqui está um quadro de atividades muito sério:
# A tibble: 6 x 4 activity category start end 1 Clean house preparations 2020-07-01 00:00:00 2020-07-03 00:00:00 2 Pack bags preparations 2020-07-05 10:00:00 2020-07-05 17:00:00 3 Run to train travel 2020-07-05 17:00:00 2020-07-05 17:15:00 4 Sleep on train travel 2020-07-05 17:15:00 2020-07-06 08:00:00 5 Procrastinate procrastination 2020-07-01 00:00:00 2020-07-05 00:00:00 6 Sleep vacation 2020-07-06 08:00:00 2020-07-09 00:00:00
E aqui está o código:
library(ggplot2) library(readr) activities
Related
If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...
[ad_2]