diff --git a/.Rbuildignore b/.Rbuildignore index fb10167..03158ed 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -18,3 +18,5 @@ vignettes/precompile\.R ^CRAN-SUBMISSION$ ^README\.Rmd$ ^.mailmap$ +^\.positai$ +^\.claude$ diff --git a/.gitignore b/.gitignore index 02df9f1..580f8ab 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ CRAN-SUBMISSION toadd/* .data.csv cache/* +.positai diff --git a/DESCRIPTION b/DESCRIPTION index 22f6729..3b6d637 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: autograph Title: Automatic Plotting and Theming of Many Graphs -Version: 1.0.0 -Date: 2026-04-04 +Version: 1.0.1 +Date: 2026-04-30 Description: Visual exploration and presentation of networks should not be difficult. This package includes functions for plotting networks and network-related metrics with sensible and pretty defaults. It includes 'ggplot2'-based plot methods for many popular network package classes. diff --git a/NEWS.md b/NEWS.md index bce881c..7994ce9 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,18 @@ +# autograph 1.0.1 + +## Package + +- Updated the logo +- Fixed the error in some flavours by removing environment references in included objects + +## Plotting + +- Closed #44 by adding example that uses `ggplot2::scale_colour_discrete()` to tweak colour output + +## Tutorials + +- Fixed the tutorial to use netrics functions + # autograph 1.0.0 ## Package diff --git a/R/plot_interp.R b/R/plot_interp.R index 4c2288d..14a7f47 100644 --- a/R/plot_interp.R +++ b/R/plot_interp.R @@ -37,6 +37,7 @@ NULL #' Use `quad = FALSE` for similarity effects. #' @examples #' plot(siena_selection) +#' plot(siena_selection) + ggplot2::scale_colour_discrete() #' @export plot.selectionTable <- function(x, quad = TRUE, separation = 0, ...){ diff --git a/cran-comments.md b/cran-comments.md index 8d0c337..35c6582 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -9,4 +9,4 @@ 0 errors | 0 warnings | 0 notes -- Updates to bring autograph into line with latest version of manynet (> v2.0.0) +- Fixed the error in some flavours by removing environment references in included objects diff --git a/data/ergm_res.rda b/data/ergm_res.rda index 60e6ae4..46cc67e 100644 Binary files a/data/ergm_res.rda and b/data/ergm_res.rda differ diff --git a/inst/autograph.png b/inst/autograph.png new file mode 100644 index 0000000..114bb6f Binary files /dev/null and b/inst/autograph.png differ diff --git a/inst/autograph_logo.png b/inst/autograph_old.png similarity index 100% rename from inst/autograph_logo.png rename to inst/autograph_old.png diff --git a/inst/tutorials/tutorial2/visualisation.Rmd b/inst/tutorials/tutorial2/visualisation.Rmd index af514ef..3574977 100644 --- a/inst/tutorials/tutorial2/visualisation.Rmd +++ b/inst/tutorials/tutorial2/visualisation.Rmd @@ -273,7 +273,7 @@ to the node. ```{r degsize, exercise = TRUE, fig.width=9} fict_lotr %>% - mutate(Degree = node_deg(fict_lotr)) %>% + mutate(Degree = node_by_deg(fict_lotr)) %>% graphr(node_size = "Degree") ``` @@ -291,7 +291,7 @@ then `graphr()` will even try to use this information automatically. ```{r tiesize, exercise = TRUE, fig.width=9} fict_lotr %>% - mutate_ties(weight = tie_closeness(fict_lotr), + mutate_ties(weight = tie_by_closeness(fict_lotr), is_tri = tie_is_triangular(fict_lotr)) %>% graphr(edge_color = "is_tri") ``` @@ -444,7 +444,7 @@ such as in the following figure, or are absent. ```{r maxbet, exercise = TRUE, fig.width=9} fict_lotr %>% - mutate(maxbet = node_is_max(node_betweenness(fict_lotr))) %>% + mutate(maxbet = node_is_max(node_by_betweenness(fict_lotr))) %>% graphr(node_color = "maxbet") ``` @@ -457,7 +457,7 @@ span multiple lines. ```{r legend, exercise=TRUE, fig.width=9} fict_lotr %>% - mutate(maxbet = node_is_max(node_betweenness(fict_lotr))) %>% + mutate(maxbet = node_is_max(node_by_betweenness(fict_lotr))) %>% graphr(node_color = "maxbet") + guides(color = "legend") + labs(color = "Maximum\nBetweenness") @@ -519,7 +519,7 @@ FR offers a good baseline for most types of networks. The _Stress Minimisation_ (stress) method is related to the KK algorithm, but offers better runtime, quality, and stability and so is generally preferred. -Indeed, `{manynet}` uses it as the default for most networks. +Indeed, `{autograph}` uses it as the default for most networks. It has the advantage of returning the same layout each time it is run on the same network. ```{r layoutinterp-Q, echo=FALSE, purl = FALSE} @@ -679,10 +679,10 @@ While the `grapht()` function is not as flexible as `graphr()`, it is very useful for visualising changes in networks over time. ```{r grapht, exercise=TRUE} -fict_lotr %>% - mutate_ties(year = sample(1:12, 66, replace = TRUE)) %>% - to_waves(attribute = "year", cumulative = TRUE) %>% - grapht() +# fict_lotr %>% + # mutate_ties(year = sample(1:12, 66, replace = TRUE)) %>% + # to_waves(attribute = "year", cumulative = TRUE) %>% + # grapht() ``` More functionality will be added to this function in future releases. @@ -772,11 +772,11 @@ Let's try this now with a few examples. ```{r plotexamples, exercise=TRUE, fig.width=9} stocnet_theme("default") -plot(node_degree(fict_lotr)) + -plot(node_closeness(fict_lotr)) +plot(node_by_degree(fict_lotr)) + +plot(node_by_closeness(fict_lotr)) stocnet_theme("oxf") -plot(node_degree(fict_lotr)) + -plot(node_closeness(fict_lotr)) +plot(node_by_degree(fict_lotr)) + +plot(node_by_closeness(fict_lotr)) ``` This is a very simple example, but the same principle applies to diff --git a/inst/tutorials/tutorial2/visualisation.html b/inst/tutorials/tutorial2/visualisation.html index e1e4675..53ed537 100644 --- a/inst/tutorials/tutorial2/visualisation.html +++ b/inst/tutorials/tutorial2/visualisation.html @@ -13,7 +13,7 @@ - + Visualisation @@ -455,7 +455,7 @@

Sizing nodes

data-diagnostics="1" data-startover="1" data-lines="0" data-pipe="|>">
fict_lotr %>% 
-  mutate(Degree = node_deg(fict_lotr)) %>% 
+  mutate(Degree = node_by_deg(fict_lotr)) %>% 
   graphr(node_size = "Degree")
@@ -475,7 +475,7 @@

Tying up loose ends

data-diagnostics="1" data-startover="1" data-lines="0" data-pipe="|>">
fict_lotr %>% 
-  mutate_ties(weight = tie_closeness(fict_lotr),
+  mutate_ties(weight = tie_by_closeness(fict_lotr),
               is_tri = tie_is_triangular(fict_lotr)) %>% 
   graphr(edge_color = "is_tri")
@@ -513,7 +513,10 @@

Who’s hue?

nodes. Because the graphr() function is based on the grammar of graphics, it’s easy to extend or alter aesthetic aspects. Here let’s try and change the colors assigned to the different races in -the fict_lotr dataset.

+the fict_lotr dataset. Note that despite the argument being +node_color, when overwriting the colors please use +functions of the type ggplot2::scale_fill_*(), as it is the +“fill” aesthetic that is being mapped to the variable in this case.

@@ -522,11 +525,12 @@

Who’s hue?

graphr(fict_lotr, node_color = "Race") + - ggplot2::scale_colour_hue() + ggplot2::scale_fill_hue()

At this stage, it is worth noting that not everyone experiences -colours in the same way. Some people are colour-blind, and so it is +colours in the same way. Some people are colour-blind, whether by +deuteranomaly, deuteranopia, protanomaly, or protanopia, and so it is worth checking that your visualisations are accessible to them.6 Others are less sensitive to colour @@ -562,7 +566,7 @@

Grayscale

data-lines="0" data-pipe="|>">
graphr(fict_lotr,
            node_color = "Race") +
-  ggplot2::scale_colour_grey()
+ ggplot2::scale_fill_grey()

As you can see, grayscale is more effective for continuous variables @@ -580,14 +584,14 @@

Manual override

data-pipe="|>">
graphr(fict_lotr,
            node_color = "Race") +
-  ggplot2::scale_colour_manual(
+  ggplot2::scale_fill_manual(
     values = c("Dwarf" = "red",
                "Hobbit" = "orange",
                "Maiar" = "#DEC20B",
                "Human" = "lightblue",
                "Elf" = "lightgreen",
                "Ent" = "darkgreen")) +
-  labs(color = "Color")
+ labs(fill = "Color") @@ -651,7 +655,7 @@

Legends

data-diagnostics="1" data-startover="1" data-lines="0" data-pipe="|>">
fict_lotr %>% 
-  mutate(maxbet = node_is_max(node_betweenness(fict_lotr))) %>% 
+  mutate(maxbet = node_is_max(node_by_betweenness(fict_lotr))) %>% 
   graphr(node_color = "maxbet")
@@ -665,7 +669,7 @@

Legends

data-diagnostics="1" data-startover="1" data-lines="0" data-pipe="|>">
fict_lotr %>% 
-  mutate(maxbet = node_is_max(node_betweenness(fict_lotr))) %>% 
+  mutate(maxbet = node_is_max(node_by_betweenness(fict_lotr))) %>% 
   graphr(node_color = "maxbet") +
   guides(color = "legend") + 
   labs(color = "Maximum\nBetweenness")
@@ -732,7 +736,7 @@

Force-directed layouts

baseline for most types of networks.

The Stress Minimisation (stress) method is related to the KK algorithm, but offers better runtime, quality, and stability and so is -generally preferred. Indeed, {manynet} uses it as the +generally preferred. Indeed, {autograph} uses it as the default for most networks. It has the advantage of returning the same layout each time it is run on the same network.

@@ -909,10 +913,10 @@

Dynamics

-
fict_lotr %>%
-  mutate_ties(year = sample(1:12, 66, replace = TRUE)) %>%
-  to_waves(attribute = "year", cumulative = TRUE) %>%
-  grapht()
+
# fict_lotr %>%
+  # mutate_ties(year = sample(1:12, 66, replace = TRUE)) %>%
+  # to_waves(attribute = "year", cumulative = TRUE) %>%
+  # grapht()

More functionality will be added to this function in future @@ -1005,11 +1009,11 @@

Plotting

data-completion="1" data-diagnostics="1" data-startover="1" data-lines="0" data-pipe="|>">
stocnet_theme("default")
-plot(node_degree(fict_lotr)) + 
-plot(node_closeness(fict_lotr))
+plot(node_by_degree(fict_lotr)) + 
+plot(node_by_closeness(fict_lotr))
 stocnet_theme("oxf")
-plot(node_degree(fict_lotr)) + 
-plot(node_closeness(fict_lotr))
+plot(node_by_degree(fict_lotr)) + +plot(node_by_closeness(fict_lotr))

This is a very simple example, but the same principle applies to all @@ -1330,7 +1334,7 @@

Exporting plots to PDF

"library(autograph)", "stocnet_theme(\"default\")", "library(migraph)", "library(patchwork)", "clear_glossary()", "knitr::opts_chunk$set(echo = FALSE)" ), chunk_opts = list(label = "setup", include = FALSE)), setup = NULL, - chunks = list(list(label = "degsize", code = "fict_lotr %>% \n mutate(Degree = node_deg(fict_lotr)) %>% \n graphr(node_size = \"Degree\")", + chunks = list(list(label = "degsize", code = "fict_lotr %>% \n mutate(Degree = node_by_deg(fict_lotr)) %>% \n graphr(node_size = \"Degree\")", opts = list(label = "\"degsize\"", exercise = "TRUE", fig.width = "9"), engine = "r")), code_check = NULL, error_check = NULL, check = NULL, solution = NULL, tests = NULL, @@ -1351,7 +1355,7 @@

Exporting plots to PDF

message = TRUE, render = NULL, ref.label = NULL, child = NULL, engine = "r", split = FALSE, include = TRUE, purl = TRUE, max.print = 1000, label = "degsize", exercise = TRUE, - code = c("fict_lotr %>% ", " mutate(Degree = node_deg(fict_lotr)) %>% ", + code = c("fict_lotr %>% ", " mutate(Degree = node_by_deg(fict_lotr)) %>% ", " graphr(node_size = \"Degree\")"), out.width.px = 864, out.height.px = 384, params.src = "degsize, exercise = TRUE, fig.width=9", fig.num = 0, exercise.df_print = "paged", exercise.checker = "NULL"), @@ -1372,7 +1376,7 @@

Exporting plots to PDF

"library(autograph)", "stocnet_theme(\"default\")", "library(migraph)", "library(patchwork)", "clear_glossary()", "knitr::opts_chunk$set(echo = FALSE)" ), chunk_opts = list(label = "setup", include = FALSE)), setup = NULL, - chunks = list(list(label = "tiesize", code = "fict_lotr %>% \n mutate_ties(weight = tie_closeness(fict_lotr),\n is_tri = tie_is_triangular(fict_lotr)) %>% \n graphr(edge_color = \"is_tri\")", + chunks = list(list(label = "tiesize", code = "fict_lotr %>% \n mutate_ties(weight = tie_by_closeness(fict_lotr),\n is_tri = tie_is_triangular(fict_lotr)) %>% \n graphr(edge_color = \"is_tri\")", opts = list(label = "\"tiesize\"", exercise = "TRUE", fig.width = "9"), engine = "r")), code_check = NULL, error_check = NULL, check = NULL, solution = NULL, tests = NULL, @@ -1393,7 +1397,7 @@

Exporting plots to PDF

message = TRUE, render = NULL, ref.label = NULL, child = NULL, engine = "r", split = FALSE, include = TRUE, purl = TRUE, max.print = 1000, label = "tiesize", exercise = TRUE, - code = c("fict_lotr %>% ", " mutate_ties(weight = tie_closeness(fict_lotr),", + code = c("fict_lotr %>% ", " mutate_ties(weight = tie_by_closeness(fict_lotr),", " is_tri = tie_is_triangular(fict_lotr)) %>% ", " graphr(edge_color = \"is_tri\")"), out.width.px = 864, out.height.px = 384, params.src = "tiesize, exercise = TRUE, fig.width=9", @@ -1457,7 +1461,7 @@

Exporting plots to PDF

"library(autograph)", "stocnet_theme(\"default\")", "library(migraph)", "library(patchwork)", "clear_glossary()", "knitr::opts_chunk$set(echo = FALSE)" ), chunk_opts = list(label = "setup", include = FALSE)), setup = NULL, - chunks = list(list(label = "colorch", code = "graphr(fict_lotr,\n node_color = \"Race\")\n\ngraphr(fict_lotr,\n node_color = \"Race\") +\n ggplot2::scale_colour_hue()", + chunks = list(list(label = "colorch", code = "graphr(fict_lotr,\n node_color = \"Race\")\n\ngraphr(fict_lotr,\n node_color = \"Race\") +\n ggplot2::scale_fill_hue()", opts = list(label = "\"colorch\"", exercise = "TRUE", fig.width = "9"), engine = "r")), code_check = NULL, error_check = NULL, check = NULL, solution = NULL, tests = NULL, @@ -1480,9 +1484,9 @@

Exporting plots to PDF

max.print = 1000, label = "colorch", exercise = TRUE, code = c("graphr(fict_lotr,", " node_color = \"Race\")", "", "graphr(fict_lotr,", " node_color = \"Race\") +", - " ggplot2::scale_colour_hue()"), out.width.px = 864, - out.height.px = 384, params.src = "colorch, exercise=TRUE, fig.width=9", - fig.num = 0, exercise.df_print = "paged", exercise.checker = "NULL"), + " ggplot2::scale_fill_hue()"), out.width.px = 864, out.height.px = 384, + params.src = "colorch, exercise=TRUE, fig.width=9", fig.num = 0, + exercise.df_print = "paged", exercise.checker = "NULL"), engine = "r", version = "4"), class = c("r", "tutorial_exercise" ))) @@ -1500,7 +1504,7 @@

Exporting plots to PDF

"library(autograph)", "stocnet_theme(\"default\")", "library(migraph)", "library(patchwork)", "clear_glossary()", "knitr::opts_chunk$set(echo = FALSE)" ), chunk_opts = list(label = "setup", include = FALSE)), setup = NULL, - chunks = list(list(label = "greyscale", code = "graphr(fict_lotr,\n node_color = \"Race\") +\n ggplot2::scale_colour_grey()", + chunks = list(list(label = "greyscale", code = "graphr(fict_lotr,\n node_color = \"Race\") +\n ggplot2::scale_fill_grey()", opts = list(label = "\"greyscale\"", exercise = "TRUE", fig.width = "9"), engine = "r")), code_check = NULL, error_check = NULL, check = NULL, solution = NULL, tests = NULL, @@ -1522,7 +1526,7 @@

Exporting plots to PDF

engine = "r", split = FALSE, include = TRUE, purl = TRUE, max.print = 1000, label = "greyscale", exercise = TRUE, code = c("graphr(fict_lotr,", " node_color = \"Race\") +", - " ggplot2::scale_colour_grey()"), out.width.px = 864, + " ggplot2::scale_fill_grey()"), out.width.px = 864, out.height.px = 384, params.src = "greyscale, exercise=TRUE, fig.width=9", fig.num = 0, exercise.df_print = "paged", exercise.checker = "NULL"), engine = "r", version = "4"), class = c("r", "tutorial_exercise" @@ -1542,7 +1546,7 @@

Exporting plots to PDF

"library(autograph)", "stocnet_theme(\"default\")", "library(migraph)", "library(patchwork)", "clear_glossary()", "knitr::opts_chunk$set(echo = FALSE)" ), chunk_opts = list(label = "setup", include = FALSE)), setup = NULL, - chunks = list(list(label = "mancolor", code = "graphr(fict_lotr,\n node_color = \"Race\") +\n ggplot2::scale_colour_manual(\n values = c(\"Dwarf\" = \"red\",\n \"Hobbit\" = \"orange\",\n \"Maiar\" = \"#DEC20B\",\n \"Human\" = \"lightblue\",\n \"Elf\" = \"lightgreen\",\n \"Ent\" = \"darkgreen\")) +\n labs(color = \"Color\")", + chunks = list(list(label = "mancolor", code = "graphr(fict_lotr,\n node_color = \"Race\") +\n ggplot2::scale_fill_manual(\n values = c(\"Dwarf\" = \"red\",\n \"Hobbit\" = \"orange\",\n \"Maiar\" = \"#DEC20B\",\n \"Human\" = \"lightblue\",\n \"Elf\" = \"lightgreen\",\n \"Ent\" = \"darkgreen\")) +\n labs(fill = \"Color\")", opts = list(label = "\"mancolor\"", exercise = "TRUE", fig.width = "9"), engine = "r")), code_check = NULL, error_check = NULL, check = NULL, solution = NULL, tests = NULL, @@ -1564,10 +1568,10 @@

Exporting plots to PDF

engine = "r", split = FALSE, include = TRUE, purl = TRUE, max.print = 1000, label = "mancolor", exercise = TRUE, code = c("graphr(fict_lotr,", " node_color = \"Race\") +", - " ggplot2::scale_colour_manual(", " values = c(\"Dwarf\" = \"red\",", + " ggplot2::scale_fill_manual(", " values = c(\"Dwarf\" = \"red\",", " \"Hobbit\" = \"orange\",", " \"Maiar\" = \"#DEC20B\",", " \"Human\" = \"lightblue\",", " \"Elf\" = \"lightgreen\",", - " \"Ent\" = \"darkgreen\")) +", " labs(color = \"Color\")" + " \"Ent\" = \"darkgreen\")) +", " labs(fill = \"Color\")" ), out.width.px = 864, out.height.px = 384, params.src = "mancolor, exercise=TRUE, fig.width=9", fig.num = 0, exercise.df_print = "paged", exercise.checker = "NULL"), engine = "r", version = "4"), class = c("r", "tutorial_exercise" @@ -1670,7 +1674,7 @@

Exporting plots to PDF

"library(autograph)", "stocnet_theme(\"default\")", "library(migraph)", "library(patchwork)", "clear_glossary()", "knitr::opts_chunk$set(echo = FALSE)" ), chunk_opts = list(label = "setup", include = FALSE)), setup = NULL, - chunks = list(list(label = "maxbet", code = "fict_lotr %>% \n mutate(maxbet = node_is_max(node_betweenness(fict_lotr))) %>% \n graphr(node_color = \"maxbet\")", + chunks = list(list(label = "maxbet", code = "fict_lotr %>% \n mutate(maxbet = node_is_max(node_by_betweenness(fict_lotr))) %>% \n graphr(node_color = \"maxbet\")", opts = list(label = "\"maxbet\"", exercise = "TRUE", fig.width = "9"), engine = "r")), code_check = NULL, error_check = NULL, check = NULL, solution = NULL, tests = NULL, @@ -1691,7 +1695,7 @@

Exporting plots to PDF

message = TRUE, render = NULL, ref.label = NULL, child = NULL, engine = "r", split = FALSE, include = TRUE, purl = TRUE, max.print = 1000, label = "maxbet", exercise = TRUE, - code = c("fict_lotr %>% ", " mutate(maxbet = node_is_max(node_betweenness(fict_lotr))) %>% ", + code = c("fict_lotr %>% ", " mutate(maxbet = node_is_max(node_by_betweenness(fict_lotr))) %>% ", " graphr(node_color = \"maxbet\")"), out.width.px = 864, out.height.px = 384, params.src = "maxbet, exercise = TRUE, fig.width=9", fig.num = 0, exercise.df_print = "paged", exercise.checker = "NULL"), @@ -1712,7 +1716,7 @@

Exporting plots to PDF

"library(autograph)", "stocnet_theme(\"default\")", "library(migraph)", "library(patchwork)", "clear_glossary()", "knitr::opts_chunk$set(echo = FALSE)" ), chunk_opts = list(label = "setup", include = FALSE)), setup = NULL, - chunks = list(list(label = "legend", code = "fict_lotr %>% \n mutate(maxbet = node_is_max(node_betweenness(fict_lotr))) %>% \n graphr(node_color = \"maxbet\") +\n guides(color = \"legend\") + \n labs(color = \"Maximum\\nBetweenness\")", + chunks = list(list(label = "legend", code = "fict_lotr %>% \n mutate(maxbet = node_is_max(node_by_betweenness(fict_lotr))) %>% \n graphr(node_color = \"maxbet\") +\n guides(color = \"legend\") + \n labs(color = \"Maximum\\nBetweenness\")", opts = list(label = "\"legend\"", exercise = "TRUE", fig.width = "9"), engine = "r")), code_check = NULL, error_check = NULL, check = NULL, solution = NULL, tests = NULL, @@ -1733,7 +1737,7 @@

Exporting plots to PDF

message = TRUE, render = NULL, ref.label = NULL, child = NULL, engine = "r", split = FALSE, include = TRUE, purl = TRUE, max.print = 1000, label = "legend", exercise = TRUE, - code = c("fict_lotr %>% ", " mutate(maxbet = node_is_max(node_betweenness(fict_lotr))) %>% ", + code = c("fict_lotr %>% ", " mutate(maxbet = node_is_max(node_by_betweenness(fict_lotr))) %>% ", " graphr(node_color = \"maxbet\") +", " guides(color = \"legend\") + ", " labs(color = \"Maximum\\nBetweenness\")"), out.width.px = 864, out.height.px = 384, params.src = "legend, exercise=TRUE, fig.width=9", @@ -1788,11 +1792,11 @@

Exporting plots to PDF

@@ -2014,10 +2018,10 @@

Exporting plots to PDF

@@ -2166,7 +2170,7 @@

Exporting plots to PDF

"library(autograph)", "stocnet_theme(\"default\")", "library(migraph)", "library(patchwork)", "clear_glossary()", "knitr::opts_chunk$set(echo = FALSE)" ), chunk_opts = list(label = "setup", include = FALSE)), setup = NULL, - chunks = list(list(label = "grapht", code = "fict_lotr %>%\n mutate_ties(year = sample(1:12, 66, replace = TRUE)) %>%\n to_waves(attribute = \"year\", cumulative = TRUE) %>%\n grapht()", + chunks = list(list(label = "grapht", code = "# fict_lotr %>%\n # mutate_ties(year = sample(1:12, 66, replace = TRUE)) %>%\n # to_waves(attribute = \"year\", cumulative = TRUE) %>%\n # grapht()", opts = list(label = "\"grapht\"", exercise = "TRUE"), engine = "r")), code_check = NULL, error_check = NULL, check = NULL, solution = NULL, tests = NULL, options = list( @@ -2186,9 +2190,9 @@

Exporting plots to PDF

message = TRUE, render = NULL, ref.label = NULL, child = NULL, engine = "r", split = FALSE, include = TRUE, purl = TRUE, max.print = 1000, label = "grapht", exercise = TRUE, - code = c("fict_lotr %>%", " mutate_ties(year = sample(1:12, 66, replace = TRUE)) %>%", - " to_waves(attribute = \"year\", cumulative = TRUE) %>%", - " grapht()"), out.width.px = 624, out.height.px = 384, + code = c("# fict_lotr %>%", " # mutate_ties(year = sample(1:12, 66, replace = TRUE)) %>%", + " # to_waves(attribute = \"year\", cumulative = TRUE) %>%", + " # grapht()"), out.width.px = 624, out.height.px = 384, params.src = "grapht, exercise=TRUE", fig.num = 0, exercise.df_print = "paged", exercise.checker = "NULL"), engine = "r", version = "4"), class = c("r", "tutorial_exercise"))) @@ -2255,7 +2259,7 @@

Exporting plots to PDF

"library(autograph)", "stocnet_theme(\"default\")", "library(migraph)", "library(patchwork)", "clear_glossary()", "knitr::opts_chunk$set(echo = FALSE)" ), chunk_opts = list(label = "setup", include = FALSE)), setup = NULL, - chunks = list(list(label = "plotexamples", code = "stocnet_theme(\"default\")\nplot(node_degree(fict_lotr)) + \nplot(node_closeness(fict_lotr))\nstocnet_theme(\"oxf\")\nplot(node_degree(fict_lotr)) + \nplot(node_closeness(fict_lotr))", + chunks = list(list(label = "plotexamples", code = "stocnet_theme(\"default\")\nplot(node_by_degree(fict_lotr)) + \nplot(node_by_closeness(fict_lotr))\nstocnet_theme(\"oxf\")\nplot(node_by_degree(fict_lotr)) + \nplot(node_by_closeness(fict_lotr))", opts = list(label = "\"plotexamples\"", exercise = "TRUE", fig.width = "9"), engine = "r")), code_check = NULL, error_check = NULL, check = NULL, solution = NULL, tests = NULL, @@ -2276,9 +2280,9 @@

Exporting plots to PDF

message = TRUE, render = NULL, ref.label = NULL, child = NULL, engine = "r", split = FALSE, include = TRUE, purl = TRUE, max.print = 1000, label = "plotexamples", exercise = TRUE, - code = c("stocnet_theme(\"default\")", "plot(node_degree(fict_lotr)) + ", - "plot(node_closeness(fict_lotr))", "stocnet_theme(\"oxf\")", - "plot(node_degree(fict_lotr)) + ", "plot(node_closeness(fict_lotr))" + code = c("stocnet_theme(\"default\")", "plot(node_by_degree(fict_lotr)) + ", + "plot(node_by_closeness(fict_lotr))", "stocnet_theme(\"oxf\")", + "plot(node_by_degree(fict_lotr)) + ", "plot(node_by_closeness(fict_lotr))" ), out.width.px = 864, out.height.px = 384, params.src = "plotexamples, exercise=TRUE, fig.width=9", fig.num = 0, exercise.df_print = "paged", exercise.checker = "NULL"), engine = "r", version = "4"), class = c("r", "tutorial_exercise" @@ -2287,12 +2291,12 @@

Exporting plots to PDF

diff --git a/man/autograph-package.Rd b/man/autograph-package.Rd index 1ed7c45..ba7fe88 100644 --- a/man/autograph-package.Rd +++ b/man/autograph-package.Rd @@ -12,7 +12,7 @@ Visual exploration and presentation of networks should not be difficult. This pa } \details{ For more details, please consult the README and work through the tutorial. -The tutorial can be run locally using \code{run_tute("visualisation")}. +The tutorial is available in the package documentation and on the package website. } \seealso{ Useful links: diff --git a/man/figures/logo.png b/man/figures/logo.png index f5a84fb..114bb6f 100644 Binary files a/man/figures/logo.png and b/man/figures/logo.png differ diff --git a/man/plot_interp.Rd b/man/plot_interp.Rd index a07e24b..019fc7e 100644 --- a/man/plot_interp.Rd +++ b/man/plot_interp.Rd @@ -46,6 +46,7 @@ for use in the \code{{autograph}} package. } \examples{ plot(siena_selection) +plot(siena_selection) + ggplot2::scale_colour_discrete() plot(siena_influence) } \references{