Skip to content

Latest commit

 

History

History
16 lines (9 loc) · 876 Bytes

README.md

File metadata and controls

16 lines (9 loc) · 876 Bytes

OBSOLETE! Ggplot 3.3.0 introduced binned scales.

plot_discrete_cbar

Source with https://raw.githubusercontent.com/adrfantini/plot_discrete_cbar/master/plot_discrete_cbar.R

An R script to plot a discrete colour bar using ggplot2 such as this one: Example result

or the one at the bottom of this plot:

Example result 2

This was initially posted on StackOverflow, where you can find examples.

This topic has recently been discussed in a ggplot2 issue and pull request; these are probably much better approaches.