hadley/ggplot2 — pull request #439 by jiho (2012-03-14 17:47:08+00:00)
Title: Add a new continuous colour/fill scale using colorbrewer colours

It fetches 6 colours from a colorbrewer palette and feeds them to gradientn. It gives very nice results even if the palettes were not intended for that use originally.

Ideally, the regular brewer scale should be able to deal with this: use scacle_colour/fill_brewer() and provide a continuous or a discrete scale depending on the data... but this may run again into the problem that the data is only known at render time or something like this. Anyhow, I couldn't figure out how to do that with the current state of the code so a created new functions. The names are clearly not very inspired so I am completely open to suggestions.