EVOLUTION-MANAGER
Edit File: categorical_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: Palette for categories</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 categorical_pal {igraph}"><tr><td>categorical_pal {igraph}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Palette for categories</h2> <h3>Description</h3> <p>This is a color blind friendly palette from <a href="https://jfly.uni-koeln.de/color/">https://jfly.uni-koeln.de/color/</a>. It has 8 colors. </p> <h3>Usage</h3> <pre> categorical_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. We simply take the first <code>n</code> colors from the total 8.</p> </td></tr> </table> <h3>Details</h3> <p>This is the suggested palette for visualizations where vertex colors mark categories, e.g. community membership. </p> <h3>Value</h3> <p>A character vector of RGB color codes. </p> <h3>Examples</h3> <pre> library(igraphdata) data(karate) karate <- karate add_layout_(with_fr()) set_vertex_attr("size", value = 10) cl_k <- cluster_optimal(karate) V(karate)$color <- membership(cl_k) karate$palette <- categorical_pal(length(cl_k)) plot(karate) </pre> <h3>See Also</h3> <p>Other palettes: <code><a href="diverging_pal.html">diverging_pal</a>()</code>, <code><a href="r_pal.html">r_pal</a>()</code>, <code><a href="sequential_pal.html">sequential_pal</a>()</code> </p> <hr /><div style="text-align: center;">[Package <em>igraph</em> version 1.3.5 <a href="00Index.html">Index</a>]</div> </body></html>