Understanding the Grammar of Graphics
摘要
Delving into the grammar of graphics, this chapter unravels the complexities of data visualization in cultural analytics, emphasizing its interpretative nature. The exposition is grounded in the theoretical underpinnings of “ggplot2,” inspired by Leland Wilkinson’s pioneering framework, illustrating the construction of graphical elements through logical principles that mirror grammatical constructs in language. Key elements of the grammar of graphics are explored—from the manipulation of data and aesthetics to the strategic use of geometric objects, statistics, and themes—equipping researchers with the acumen to translate complex cultural data into persuasive visual stories. The section culminates with the application of “ggplot2” to the Musical Sentiment Dataset (MuSe), using practical examples and exercises to showcase the tool’s capacity for dissecting the emotional impact of music across genres.