arcdiagram v0.1.12

Plot pretty arc diagrams

Implementation of the function 'arcplot' for plotting pretty arc diagrams ('arcdiagram' can be seen as a plugin for the 'igraph' package)

Readme

"arcdiagram"

arcdiagram is a minimalist package that provides a basic function to plot pretty arc diagrams in R

Installation

Development version on github

# development version
library(devtools)

# install 'arcdiagram'
install_github('arcdiagram',  username='gastonstat')

Some Examples

library(arcdiagram)

# create a star graph with 10 nodes
star_graph = graph.star(10, mode="out")

# extract edgelist
star_edges = get.edgelist(star_graph)

# inspect star_edges
star_edges

# plot 1: default arc diagram
arcplot(star_edges)

# plot 2: show nodes as circles, in decreasing order
arcplot(star_edges, show.nodes=TRUE, sorted=TRUE, decreasing=TRUE, las=1)

# plot 3: different ordering, arc widths, arc colors, and node sizes
set.seed(120)
arcplot(star_edges, ordering=sample(1:10), labels=paste("node",1:10,sep="-"),
   lwd.arcs=4*runif(10,.5,2), col.arcs=hsv(runif(9,0.6,0.8),alpha=0.4),
   show.nodes=TRUE, pch.nodes=21, cex.nodes=runif(10,1,3), 
   col.nodes="gray80", bg.nodes="gray90", lwd.nodes=2)

# plot 4: same as plot 3 but vertically oriented
set.seed(120)
op = par(mar = c(0.5, 5, 0.5, 3))
arcplot(star_edges, ordering=sample(1:10), horizontal=FALSE,
   labels=paste("node",1:10,sep="-"),
   lwd.arcs=4*runif(10,.5,2), col.arcs=hsv(runif(9,0.6,0.8),alpha=0.4),
   show.nodes=TRUE, pch.nodes=21, cex.nodes=runif(10,1,3), 
   col.nodes="gray80", bg.nodes="gray90", lwd.nodes=2)
par(op)

Author Contact

www.gastonsanchez.com

Gaston Sanchez (gaston.stat at gmail.com)

Functions in arcdiagram

Name Description
arcplot Arc Diagram Plot
graph_info Graph Information
above_below Above or Below
xynodes X or Y coordinates of node locations
min_max_margin Minimum and Maximum Margin Limits
node_coords Node Coordinates
arc_radius_locs Arc Radius Locations
No Results!

Vignettes of arcdiagram

Name
introduction.Rmd
les-miserables.Rmd
network.Rmd
No Results!

Details

Type Package
Date 2018-12-01
URL https://github.com/gastonstat/arcdiagram
VignetteBuilder knitr
License GPL-3
LazyData true
Collate 'arcplot.r'
RoxygenNote 6.0.1

Include our badge in your README

[![Rdoc](http://www.rdocumentation.org/badges/version/arcdiagram)](http://www.rdocumentation.org/packages/arcdiagram)