-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expanding color_tile to 2+ colours #113
Comments
you can use the concept of color tile and write your own function, like this
Then, you call it just like you would call color tile, in the table call. Here's an example from a recent table that I had.
Note - this is a manual-ish work around. You could alternately use the scales package to generate a scale for colors and not have to set the cut points manually. |
Something like this might work, leveraging RColorBrewer
Example
|
Hi,
I asked this question on stack, where I was looking to achieve the usage of
color_tile
rowwise, and the answer provided which works great.However, what I would like to do now is to expand the use of color_tile towards 3 colours, in a traffic colour gradient (red-yellow-green). Here, the solution isn't very effective if I use "red" and "green" as parameters to
color_tile
as the central colour is brown.I tried adapting this answer, however the manner I am using
color_tile
is different than the one in the question, as I'm implementing the function row-wise in a loop.. and I get numerous errors.Was wondering if you guys would know of a work-around - it would be greatly appreciated.
The text was updated successfully, but these errors were encountered: