Description Usage Arguments Details Value Author(s) Examples
Methods to send legends to RedeR app.
1 2 3 | addLegend.color(obj, colvec, ...)
addLegend.size(obj, sizevec, ...)
addLegend.shape(obj, shapevec, ...)
|
obj |
Object of RedPort Class. |
colvec |
Vector with legend colors, either hexadecimal or valid R color names. |
sizevec |
Vector with legend node size, options: > 0 <numeric>. |
shapevec |
Vector with valid shape names: 'ELLIPSE', 'RECTANGLE', 'ROUNDED_RECTANGLE', 'TRIANGLE', 'DIAMOND'. |
... |
Additional arguments passed to RedeR application. |
Alternatively, colvec, sizevec and shapevec can be igraph objects with legend information previously set by the functions 'att.setv' and 'att.sete'.
Additional arguments:
Legend type. Options: "node" or "edge" (default: "node") <character>.
Vector with legend labels <character>.
Position of the legend in RedeR panel. Options: 'topleft','topright','bottomleft','bottomright' (default: addLegend.color "topright", addLegend.size "bottomleft", and addLegend.shape "bottomright" )<character>.
Distance (in pixel) from panel border (default: 5 ) <numeric>.
Distance (in pixel) from panel border (default: 5 ) <numeric>.
Logical value, set vertical/horizontal position of the legend in the app panel (default: TRUE for addLegend.color and addLegend.size and FALSE for addLegend.shape.
Font size (in pixel) (default: 8) <numeric>.
Legend title <string>.
Distance (in pixel) from legend title to the main axis (default: 35) <numeric>.
Legend size; only for addLegend.color and addLegend.shape methods (default: 30) <numeric>.
Legend width/height ratio; only for addLegend.color method (default: 0.85) <numeric>.
Legend color; only for addLegend.size and addLegend.shape methods (default: "#000000") <either hexadecimal or valid color name>.
Legend inter space (only for addLegend.size and addLegend.shape methods) (default: 0) <numeric>.
Length of the edges in addLegend.size method (default: 50) <numeric>.
Send legend objects to RedeR app.
Mauro Castro
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | # Initialize igraph
library(igraph)
## Not run:
rdp <- RedPort()
calld(rdp)
cols<-colorRampPalette(colors=c('red','blue'))(14)
addLegend.color(rdp,cols)
addLegend.color(rdp,cols,type="edge")
size<-c(10,20,30,40,50)
addLegend.size(rdp,size)
size<-c(1:10)
addLegend.size(rdp,size,type="edge")
shape<-c('ELLIPSE', 'RECTANGLE', 'ROUNDED_RECTANGLE', 'TRIANGLE', 'DIAMOND')
addLegend.shape(rdp,shape)
shape<-c('SOLID','DOTTED','DOTTED_SHORT','LONG_DASH')
addLegend.shape(rdp,shape,type="edge")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.