0
votes

My data consists of a date variable and four numeric variables, of the 4 numeric variables I wish to plot two of these as a stacked bar chart and the remaining variables as line charts.

Is it possible to create two line charts and a stacked bar chart in a single plot using ggplot?

My data looks as follows:

data <- tibble(Month = 1:12,Brands = c(1,1,1,1,1,1,2,2,2,2,2,2),Generics = Brands + 1,Metric1 = c(5,5,5,5,5,5,6,6,7,8,9,10),Metric2 = c(10,10,11,11,12,13,14,15,16,17,18,19))