USCbiostats / partition

A fast and flexible framework for data reduction in R
https://uscbiostats.github.io/partition/
Other
34 stars 5 forks source link

Stacked area charts have white columns appearing #3

Closed malcolmbarrett closed 4 years ago

malcolmbarrett commented 4 years ago

I believe this issue is related to changes in ggplot2 that modified the way stacked positions are ordered, made in tidyverse/ggplot2#3471 and discussed in tidyverse/ggplot2#3498. It seems like fixing that issue will fix this one, but I'm opening this to make sure that is the case. I will file an issue if fixing the example already posted does not fix ours.

library(partition)
set.seed(1234)
df <- simulate_block_data(c(3, 4, 5), lower_corr = .4, upper_corr = .6, n = 100)
plot_stacked_area_clusters(df) +
  ggplot2::theme_minimal(14)

Created on 2019-12-11 by the reprex package (v0.3.0)

malcolmbarrett commented 4 years ago

This is now fixed in the development version of ggplot2 (tidyverse/ggplot2#3680), which I've added as a dependency. I'm going to keep this open until the next ggplot2 release, at which time I will specify that dependency.

library(partition)
set.seed(1234)
df <- simulate_block_data(c(3, 4, 5), lower_corr = .4, upper_corr = .6, n = 100)
plot_stacked_area_clusters(df) +
  ggplot2::theme_minimal(14)

Created on 2019-12-20 by the reprex package (v0.3.0)