I have Searched the net but couldn't find How to do the same thing for the geom_bars.
Can I do the same for geom_bar? If Yes then what would be the approach. I have Y values which are selected based on my selection of a different variable. As for example I have this dataframe
df <- data.frame(Scenarios = c(rep("Land",3),"Land_1"), Year = c(rep("2050",2), "2030"), Area_Crop =
c(100,200,300,400), Area_Water = c(40,50,60,70), Area_Forest = c(150,250,350,450))
The selection from this table has to be used to plot a bar on an already existing bar plot where the Y values are already plotted for each year. This values can be melted using Scenarios and Year as measure.vars to bring it under one column (our Y value) and the same has been done on the table for the already existing plot.
In short I select a scenario than its respective bar plot should be added to the existing barplot just like you did it for the points.