Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
学ぶ Introduction to ggplot2 | Data Visualization
Data Analysis with R

bookIntroduction to ggplot2

メニューを表示するにはスワイプしてください

ggplot2 is a part of the tidyverse collection of R packages. It's used to create powerful, layered, and customizable data visualizations.

To use it, load the libraries:

library(tidyverse)
library(ggplot2)

And disable scientific notation to make plots more readable:

options(scipen = 999)

Basic Structure of a ggplot2 Plot

Every ggplot2 visualization is constructed in layers:

ggplot(data, aes(x, y)) +
  geom_function()
  • data: the dataset being used;
  • aes(): aesthetic mappings (define how variables are mapped to axes or other properties);
  • geom_*(): geometry layer (determines how the data will be displayed, such as bars, points, or lines).

Summary

question mark

What is the purpose of the aes() function in ggplot2?

正しい答えを選んでください

すべて明確でしたか?

どのように改善できますか?

フィードバックありがとうございます!

セクション 2.  1

AIに質問する

expand

AIに質問する

ChatGPT

何でも質問するか、提案された質問の1つを試してチャットを始めてください

セクション 2.  1
some-alt