qtheme
- This function builds generic themes to add a theme to a
Network
object rather than individual print
arguments.
theme_nightheat
A night heat theme.
theme_badkitchen
A 70s kitchen theme.
theme_cafe
A cafe theme.
theme_grayscale
A grayscale theme.
theme_norah
A Norah theme.
theme_hipster
A hipster theme.
theme_duskheat
A duskheat theme.
qtheme(
x = "generic",
title,
title.color,
layout,
legend,
legend.cex,
legend.text.color,
legend.gradient,
bg,
vertex.color,
vertex.size,
vertex.frame.color,
vertex.label.color,
vertex.label.cex,
edge.label.color,
edge.label.cex
)theme_nightheat(
x = pars[["x"]],
title = pars[["title"]],
title.color = pars[["title.color"]],
layout = pars[["layout"]],
legend = pars[["legend"]],
legend.cex = pars[["legend.cex"]],
legend.gradient = pars[["legend.gradient"]],
bg = pars[["bg"]],
legend.text.color = pars[["legend.text.color"]],
vertex.color = pars[["vertex.color"]],
vertex.size = pars[["vertex.size"]],
vertex.frame.color = pars[["vertex.frame.color"]],
vertex.label.color = pars[["vertex.label.color"]],
vertex.label.cex = pars[["vertex.label.cex"]],
edge.label.color = pars[["edge.label.color"]],
edge.label.cex = pars[["edge.label.cex"]],
...
)
theme_badkitchen(
x = pars[["x"]],
title = pars[["title"]],
title.color = pars[["title.color"]],
layout = pars[["layout"]],
legend = pars[["legend"]],
legend.cex = pars[["legend.cex"]],
legend.gradient = pars[["legend.gradient"]],
bg = pars[["bg"]],
legend.text.color = pars[["legend.text.color"]],
vertex.color = pars[["vertex.color"]],
vertex.size = pars[["vertex.size"]],
vertex.frame.color = pars[["vertex.frame.color"]],
vertex.label.color = pars[["vertex.label.color"]],
vertex.label.cex = pars[["vertex.label.cex"]],
edge.label.color = pars[["edge.label.color"]],
edge.label.cex = pars[["edge.label.cex"]],
...
)
theme_cafe(
x = pars[["x"]],
title = pars[["title"]],
title.color = pars[["title.color"]],
layout = pars[["layout"]],
legend = pars[["legend"]],
legend.cex = pars[["legend.cex"]],
legend.gradient = pars[["legend.gradient"]],
bg = pars[["bg"]],
legend.text.color = pars[["legend.text.color"]],
vertex.color = pars[["vertex.color"]],
vertex.size = pars[["vertex.size"]],
vertex.frame.color = pars[["vertex.frame.color"]],
vertex.label.color = pars[["vertex.label.color"]],
vertex.label.cex = pars[["vertex.label.cex"]],
edge.label.color = pars[["edge.label.color"]],
edge.label.cex = pars[["edge.label.cex"]],
...
)
theme_grayscale(
x = pars[["x"]],
title = pars[["title"]],
title.color = pars[["title.color"]],
layout = pars[["layout"]],
legend = pars[["legend"]],
legend.cex = pars[["legend.cex"]],
legend.gradient = pars[["legend.gradient"]],
bg = pars[["bg"]],
legend.text.color = pars[["legend.text.color"]],
vertex.color = pars[["vertex.color"]],
vertex.size = pars[["vertex.size"]],
vertex.frame.color = pars[["vertex.frame.color"]],
vertex.label.color = pars[["vertex.label.color"]],
vertex.label.cex = pars[["vertex.label.cex"]],
edge.label.color = pars[["edge.label.color"]],
edge.label.cex = pars[["edge.label.cex"]],
...
)
theme_greyscale(
x = pars[["x"]],
title = pars[["title"]],
title.color = pars[["title.color"]],
layout = pars[["layout"]],
legend = pars[["legend"]],
legend.cex = pars[["legend.cex"]],
legend.gradient = pars[["legend.gradient"]],
bg = pars[["bg"]],
legend.text.color = pars[["legend.text.color"]],
vertex.color = pars[["vertex.color"]],
vertex.size = pars[["vertex.size"]],
vertex.frame.color = pars[["vertex.frame.color"]],
vertex.label.color = pars[["vertex.label.color"]],
vertex.label.cex = pars[["vertex.label.cex"]],
edge.label.color = pars[["edge.label.color"]],
edge.label.cex = pars[["edge.label.cex"]],
...
)
theme_norah(
x = pars[["x"]],
title = pars[["title"]],
title.color = pars[["title.color"]],
layout = pars[["layout"]],
legend = pars[["legend"]],
legend.cex = pars[["legend.cex"]],
legend.gradient = pars[["legend.gradient"]],
bg = pars[["bg"]],
legend.text.color = pars[["legend.text.color"]],
vertex.color = pars[["vertex.color"]],
vertex.size = pars[["vertex.size"]],
vertex.frame.color = pars[["vertex.frame.color"]],
vertex.label.color = pars[["vertex.label.color"]],
vertex.label.cex = pars[["vertex.label.cex"]],
edge.label.color = pars[["edge.label.color"]],
edge.label.cex = pars[["edge.label.cex"]],
...
)
theme_hipster(
x = pars[["x"]],
title = pars[["title"]],
title.color = pars[["title.color"]],
layout = pars[["layout"]],
legend = pars[["legend"]],
legend.cex = pars[["legend.cex"]],
legend.gradient = pars[["legend.gradient"]],
bg = pars[["bg"]],
legend.text.color = pars[["legend.text.color"]],
vertex.color = pars[["vertex.color"]],
vertex.size = pars[["vertex.size"]],
vertex.frame.color = pars[["vertex.frame.color"]],
vertex.label.color = pars[["vertex.label.color"]],
vertex.label.cex = pars[["vertex.label.cex"]],
edge.label.color = pars[["edge.label.color"]],
edge.label.cex = pars[["edge.label.cex"]],
...
)
theme_duskheat(
x = pars[["x"]],
title = pars[["title"]],
title.color = pars[["title.color"]],
layout = pars[["layout"]],
legend = pars[["legend"]],
legend.cex = pars[["legend.cex"]],
legend.gradient = pars[["legend.gradient"]],
bg = pars[["bg"]],
legend.text.color = pars[["legend.text.color"]],
vertex.color = pars[["vertex.color"]],
vertex.size = pars[["vertex.size"]],
vertex.frame.color = pars[["vertex.frame.color"]],
vertex.label.color = pars[["vertex.label.color"]],
vertex.label.cex = pars[["vertex.label.cex"]],
edge.label.color = pars[["edge.label.color"]],
edge.label.cex = pars[["edge.label.cex"]],
...
)
The name of the qtheme.
The title of the plot. NULL
eliminates title. NA
uses title attribute of the Network object.
The color of the title.
igraph layout
to use.
The coordinates of the legend. See
color.legend
for more information.
character expansion factor. NULL
and NA
are
equivalent to 1.0. See mtext
for more information.
The text legend text color.
A vector of ordered colors to use for the gradient fills in the network edges.
The color to be used for the background of the device region. See
par
for more information.
The font family to be used for vertex labels.
The size of the vertex.
The color of the vertex border.
The color of the labels.
The font size for vertex labels.
The color for the edge labels. Use NA
to
remove.
The font size of the edge labels.
Additional arguments supplied to qtheme
.
if (FALSE) {
(poldat <- with(sentSplit(DATA, 4), polarity(state, person)))
m <- Network(poldat)
m
m + theme_nightheat
m + theme_cafe
m + theme_grayscale
m + theme_norah
m + theme_hipster
m + theme_badkitchen
m + theme_duskheat
## make your own themes
theme_irish <- qtheme(x = "irish", bg = "grey25",
vertex.label.color = "grey50", legend.text.color = "white",
legend.gradient = c("darkgreen", "white", "darkorange"),
edge.label.color="white", vertex.size= 20)
m + theme_irish
}
Run the code above in your browser using DataLab