How to make vertex shapes different in R plot.igraph? - r

I'm using R and the package igraph to plot a network. The many vertices in the graph belong to 50 groups. For each group, I would like to use a unique color/vertex shape combination to distinguish it from the others.
Is there a way to plot some vertices as say circles and others as squares according to their attributes?

Related

Dataset of graph coloring with the chromatic number of the instances

Do you know any graph coloring datasets?
I want a dataset of graphs where the chromatic number of each instance is known.
DIMACS once ran a graph colouring challenge and produced a database
https://mat.tepper.cmu.edu/COLOR/instances.html

Plot each individual community with iGraph

I have generated a community network using iGraph and qGraph to determine the relatedness between individual's genetic codes above a threshold edge value. To further analyze this data, I used cluster_walktrap and then graphed this along with the network. I am wondering if there is a way label the individual communities, as well as plot a single community from the batch. I can provide extra details if need be. Thanks
Do you mean something using components, e.g.,
sapply(components(g), plot)

what's the best way to assign a large number (10-15) of visually VERY different colors in R plot (for curves - specifically CDP)

I needed to plot cumulative distribution curves for 15 different groups but the default color setting generated some curves with visually similar colors, which caused some trouble for presentation, especially when the two curves have similar cumulative distributions.
My current approach is to generate one plot first and then based on the plot assign colors on specific curves to visually separate them.
I was wondering if there are other easier approaches to plot a large number (>10) curves in distinct colors.
If you need to distinguish many items, such as curves, you should use other visual means in addition to color (or rather than color) to distinguish them. For example, you can identify the curves with letters or numbers, draw them with different line-dash patterns, use different line thicknesses, and so on.
You should only use color if you can't distinguish your curves in other ways.

Large Dataset for a directed, labeled graph

i am looking for a big dataset for a labeled graph.
The graph should have the following characteristics:
labeled Nodes and Edges (In the best case, the graph contains several nodes/edges with the same label - no unique labels)
directed (hopefully - but may not necessarily needed)
I have already searched but found nothing matching with my problem. Only something like https://snap.stanford.edu/data/, but non of the graphs satisfy my desire.

How to sort and visualize a directed graph?

I am using R with igraph and I have a square matrix with weights. I want to sort it. I thought to use page.rank(g) and I got a corresponding vector and its values.
library(igraph)
g<-get.matrix()
page.rank(g)$value
page.rank(g)$vector
Now I want to sort using this values and visualizing it in a graph if it is possible.
Something similar to the following picture:
How I could do this?
Choose a force-based layout and set the vertex size (vertex.size) to be proportional to the page rank values. See an example on the igraph homepage on how to set the vertex size. (The example uses tkplot, but you can just use plot instead of that.) You can set the vertex labels via the vertex.label argument to plot, and \n is allowed to make multi-line labels.

Resources