EVOLUTION-MANAGER
Edit File: diverging_pal.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Diverging palette</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for diverging_pal {igraph}"><tr><td>diverging_pal {igraph}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Diverging palette</h2> <h3>Description</h3> <p>This is the ‘PuOr’ palette from <a href="https://colorbrewer2.org/">https://colorbrewer2.org/</a>. It has at most eleven colors. </p> <h3>Usage</h3> <pre> diverging_pal(n) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>n</code></td> <td> <p>The number of colors in the palette. The maximum is eleven currently.</p> </td></tr> </table> <h3>Details</h3> <p>This is similar to <code><a href="sequential_pal.html">sequential_pal</a></code>, but it also puts emphasis on the mid-range values, plus the the two extreme ends. Use this palette, if you have such a quantity to mark with vertex colors. </p> <h3>Value</h3> <p>A character vector of RGB color codes. </p> <h3>See Also</h3> <p>Other palettes: <code><a href="categorical_pal.html">categorical_pal</a>()</code>, <code><a href="r_pal.html">r_pal</a>()</code>, <code><a href="sequential_pal.html">sequential_pal</a>()</code> </p> <h3>Examples</h3> <pre> ## Not run: library(igraphdata) data(foodwebs) fw <- foodwebs[[1]] %>% induced_subgraph(V(.)[ECO == 1]) %>% add_layout_(with_fr()) %>% set_vertex_attr("label", value = seq_len(gorder(.))) %>% set_vertex_attr("size", value = 10) %>% set_edge_attr("arrow.size", value = 0.3) V(fw)$color <- scales::dscale(V(fw)$Biomass %>% cut(10), diverging_pal) plot(fw) data(karate) karate <- karate %>% add_layout_(with_kk()) %>% set_vertex_attr("size", value = 10) V(karate)$color <- scales::dscale(degree(karate) %>% cut(5), diverging_pal) plot(karate) ## End(Not run) </pre> <hr /><div style="text-align: center;">[Package <em>igraph</em> version 1.3.5 <a href="00Index.html">Index</a>]</div> </body></html>