1

In R/waterfalls, when fill_by_sign = TRUE , the positive columns fill in 'green' and negative columns fill in 'red'。If I want positive columns fill in 'white', negative columns fill in 'pink',how can i do it ? Thanks!

 library(waterfalls)

plot_data <- data.frame(category = letters[1:5],
                        value = c(1, -0.2, 0.3, -0.1, -0.15))

waterfall(.data = plot_data,
          fill_by_sign = TRUE,
          calc_total = TRUE,
          total_axis_text='total')
anderwyang
  • 1,801
  • 4
  • 18

0 Answers0