You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Viridis includes a discrete = TRUE argument in scale_*_viridis() that allows the colors to be discretized. And with the most recent version of ggplot2/viridis, there are now two types of scales: scale_*_viridis_c() and scale_*_viridis_d()
Currently scale_*_scico() only works with continuous colors and the only way to get discrete colors is to generate a palette with scico(x) and use the hex values manually.
It would be nice to add discretization to the scale_*_scico() functions and bring it in line with viridis.
The text was updated successfully, but these errors were encountered:
# Can't use scale_color_scico()
ggplot(dsamp, aes(carat, price)) +
geom_point(aes(colour=clarity)) +
scale_color_scico(begin=0.2)
# Error: Discrete value supplied to continuous scale
# Can use scio() within scale_color_manual(), but must manually specify the n
ggplot(dsamp, aes(carat, price)) +
geom_point(aes(colour=clarity)) +
scale_color_manual(values= scico(8, begin=0.2, palette="roma"))
Viridis includes a
discrete = TRUE
argument inscale_*_viridis()
that allows the colors to be discretized. And with the most recent version of ggplot2/viridis, there are now two types of scales:scale_*_viridis_c()
andscale_*_viridis_d()
Currently
scale_*_scico()
only works with continuous colors and the only way to get discrete colors is to generate a palette withscico(x)
and use the hex values manually.It would be nice to add discretization to the
scale_*_scico()
functions and bring it in line with viridis.The text was updated successfully, but these errors were encountered: