Re: [R] Gradient plots in ggplot2

2021-03-09 Thread phil
Thank you for your suggestions. I found, after much experimentation, that scale_fill_gradientn did indeed provide a good solution, as below. library(ggplot2) a <- c(rep(1,6),rep(2,6),rep(3,6),rep(4,6)) b <- c(0.1, 0.5,-0.3, 1.2,-0.4,-1.2, 0.7, 0.8,-1.2,-0.5,10.0, 0.3, 0.2,-0.4,-15.

Re: [R] Gradient plots in ggplot2

2021-03-08 Thread PIKAL Petr
gt; -Original Message- > From: R-help On Behalf Of > p...@philipsmith.ca > Sent: Tuesday, March 9, 2021 5:06 AM > To: r-help@r-project.org > Subject: [R] Gradient plots in ggplot2 > > I am having trouble with a gradient fill application in ggplot2, caused > by outlier values. In m

Re: [R] Gradient plots in ggplot2

2021-03-08 Thread Jeff Newmiller
Perhaps scale_fill_gradientn() would be useful. On March 8, 2021 8:05:52 PM PST, p...@philipsmith.ca wrote: >I am having trouble with a gradient fill application in ggplot2, caused > >by outlier values. In my reprex, most of the values are between 2 and >-2, but there are two outliers, 10 and -15

[R] Gradient plots in ggplot2

2021-03-08 Thread phil
I am having trouble with a gradient fill application in ggplot2, caused by outlier values. In my reprex, most of the values are between 2 and -2, but there are two outliers, 10 and -15. The outliers stand out well, which is good, but all the other numbers show almost no colour variation. I woul