Figure 1: A visualization of character interaction networks in Shakespeare’s plays Hamlet, Macbeth, and Romeo and Juliet. The network plots display characters as nodes, with lines (edges) connecting characters who interact in the same scenes. Each plot has the title of the play centered above it. In Hamlet, nodes are blue; in Macbeth, they are brown; and in Romeo and Juliet, they are green.
Steps to Create this Graphic
1. Load Packages & Setup
Code
pacman::p_load( tidyverse, # Easily Install and Load the 'Tidyverse' ggtext, # Improved Text Rendering Support for 'ggplot2' showtext, # Using Fonts More Easily in R Graphs janitor, # Simple Tools for Examining and Cleaning Dirty Data skimr, # Compact and Flexible Summaries of Data scales, # Scale Functions for Visualization lubridate, # Make Dealing with Dates a Little Easier MetBrewer, # Color Palettes Inspired by Works at the Metropolitan Museum of Art MoMAColors, # Color Palettes Inspired by Artwork at the Museum of Modern Art in New York City glue, # Interpreted String Literals igraph, # Network Analysis and Visualization # Network Analysis and Visualization # Network Analysis and Visualization # Network Analysis and Visualization ggraph, # An Implementation of Grammar of Graphics for Graphs and Networks # An Implementation of Grammar of Graphics for Graphs and Networks # An Implementation of Grammar of Graphics for Graphs and Networks patchwork, # The Composer of Plots NatParksPalettes # Color Palettes Inspired by National Parks ) # ### |- figure size ----camcorder::gg_record(dir = here::here("temp_plots"),device ="png",width =10,height =8,units ="in",dpi =320)### |- resolution ----showtext_opts(dpi =320, regular.wt =300, bold.wt =800)