[R] outlining (highlighting) pixels in ggplot2

Eik Vettorazzi E.Vettorazzi at uke.de
Wed Dec 20 21:15:38 CET 2017


just add

limits=c(-zmax1,zmax1)

to the scale_fill_gradient2-call

hth


Am 20.12.2017 um 18:21 schrieb Morway, Eric:
> I apprecaite the guidance Eik, that works great!  I'm also wondering if
> you have any pointers for how I might stretch the color scale so that
> the max and min values are the same?  Right now, the min is -0.064 and
> the max is something closer to 0.04.  As you can see in what I sent, I
> tried adding:
> 
> zmax1 = max(abs(m1))
> 
> ggplot(..., autoscale = FALSE, zmin = -1 * zmax1, zmax = zmax1) + ...
> 
> to ggplot, but I'm either using the wrong arguments or have not added
> them to the correct spot.  I haven't been able to find the fix for this
> and would very much appreciate any further guidance you can offer for
> this last fix.  

-- 
Eik Vettorazzi

Universitätsklinikum Hamburg-Eppendorf
Institut für Medizinische Biometrie und Epidemiologie

Martinistraße 52
Gebäude W 34
20246 Hamburg

Telefon: +49 (0) 40 7410 - 58243
Fax:     +49 (0) 40 7410 - 57790

Web: www.uke.de/imbe


--

_____________________________________________________________________

Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg | www.uke.de
Vorstandsmitglieder: Prof. Dr. Burkhard Göke (Vorsitzender), Prof. Dr. Dr. Uwe Koch-Gromus, Joachim Prölß, Martina Saurin (komm.)
_____________________________________________________________________

SAVE PAPER - THINK BEFORE PRINTING


More information about the R-help mailing list