Open
Description
Dear all, I've decided to create this issue since I've noticed a weird interaction with the ggplot2
package.
According to the GUI created by c4a_gui()
, the palette brewer.rd_bu
is a diverging palette ranging from red to blue.
Nevertheless, the following code creates a palette that does not reflect the preview summarised by c4a_gui()
:
library(ggplot2)
library(cols4all)
toy <- data.frame(
x = 1:5,
y = 1:5,
z = 1:5
)
ggplot(toy) +
geom_point(aes(x = x, y = y, col = z)) +
scale_color_continuous_c4a_div(palette = "brewer.rd_bu")
Everything works as expected if I consider a “sequential” palette
ggplot(toy) +
geom_point(aes(x = x, y = y, col = z)) +
scale_color_continuous_c4a_seq(palette = "brewer.rd_bu")
Created on 2023-11-30 with reprex v2.0.2
Am I missing something? What's going on here?
Metadata
Metadata
Assignees
Labels
No labels