In the past (version < 3.3.0), to geom_histogram, geom_boxplot, geom_density 1D plot, x must be provided in the mapping system, if we run the code without providing x (but y), we will have errors "something like x is missing...". If we want to flip the chart, we have to pipe a function coord_flip()
However, in version 3.3.0+, if x is missing but y is provided, ggplot will flip the chart automatically.
The data frame order is changed. This may cause the changes of the stacked color order in loon histograms.
MAIN CHANGES in ggplot2 3.3.0+:
In the past (version < 3.3.0), to
geom_histogram
,geom_boxplot
,geom_density
1D plot,x
must be provided in the mapping system, if we run the code without providingx
(buty
), we will have errors "something like x is missing...". If we want to flip the chart, we have to pipe a functioncoord_flip()
However, in version 3.3.0+, ifx
is missing buty
is provided, ggplot will flip the chart automatically.