You setup your X & Y axis incorrectly. in your call to ggplot you have:
g <-df %>%
ggplot(aes(x=reorder(job,-span), y=span, fill=factor(job))) +
but in your call to geom_rect you are using a completely different set
of variables that is causing the error:
geom_rect(aes(xmin = ID - w/2,
I am attempting to convert an original schedule to longest operating time next
schedule then create waterfall plot. I am having trouble with the plot. I get
an Error: Discrete vale supplied to continuous variable message. My example
code appears below.
library(tidyverse)
library(ggplot2)
# ori
2 matches
Mail list logo