Commit 31e26795 authored by Masaki Ban's avatar Masaki Ban 🍜
Browse files

箱ひげ図作成プログラム

parent 9a3723c5
library(tidyverse)
#パス成功率
# CSVファイルの読み込み
df_epv <- read_csv("~/Desktop/logs/epv2base30half/pass_prob.csv") |>
select(pass_success_rate) |>
rename(epv = pass_success_rate)
df_base <- read_csv("~/Desktop/logs/base2base30half/pass_prob.csv") |>
select(pass_success_rate) |>
rename(base = pass_success_rate)
# データフレームの結合
df <- bind_cols(df_epv, df_base)
long_data <- df %>%
gather(key = "Category", value = "Value", epv, base)
p <- long_data %>%
ggplot(aes(x = Category, y = Value)) +
geom_boxplot() +
scale_x_discrete(labels = c("HELIOS Base", "EPVエージェント")) +
scale_y_continuous(limits = c(0.65, 1)) +
stat_summary(fun = mean, geom = "point", shape = 20, size = 3, color = "red") +
xlab("エージェント") +
ylab("パス成功率")
ggsave("prob.pdf", p, device = cairo_pdf, width = 3, height = 3)
# ボール保持率
# CSVファイルの読み込み
df_epv <- read_csv("~/Desktop/logs/epv2base30half/EPV.csv") |>
select(our_possession) |>
rename(epv = our_possession)
df_base <- read_csv("~/Desktop/logs/base2base30half/HELIOS_base.csv") |>
select(our_possession) |>
rename(base = our_possession)
# データフレームの結合
df <- bind_cols(df_epv, df_base)
long_data <- df %>%
gather(key = "Category", value = "Value", epv, base)
p <- long_data %>%
ggplot(aes(x = Category, y = Value)) +
geom_boxplot() +
scale_x_discrete(labels = c("HELIOS Base", "EPVエージェント")) +
scale_y_continuous(limits = c(0.3, 0.9)) +
stat_summary(fun = mean, geom = "point", shape = 20, size = 3, color = "red") +
xlab("エージェント") +
ylab("ボール保持率")
ggsave("possession.pdf", p, device = cairo_pdf, width = 3, height = 3)
# 得点
# CSVファイルの読み込み
df_epv <- read_csv("~/Desktop/logs/epv2base30half/EPV.csv") |>
select(our_point) |>
rename(epv = our_point)
df_base <- read_csv("~/Desktop/logs/base2base30half/HELIOS_base.csv") |>
select(our_point) |>
rename(base = our_point)
# データフレームの結合
df <- bind_cols(df_epv, df_base)
long_data <- df %>%
gather(key = "Category", value = "Value", epv, base)
p <- long_data %>%
ggplot(aes(x = Category, y = Value)) +
geom_boxplot() +
scale_x_discrete(labels = c("HELIOS Base", "EPVエージェント")) +
scale_y_continuous(limits = c(0, 4.5)) +
stat_summary(fun = mean, geom = "point", shape = 20, size = 3, color = "red") +
xlab("エージェント") +
ylab("得点")
ggsave("point.pdf", p, device = cairo_pdf, width = 3, height = 3)
# 失点
# CSVファイルの読み込み
df_epv <- read_csv("~/Desktop/logs/epv2base30half/EPV.csv") |>
select(opp_point) |>
rename(epv = opp_point)
df_base <- read_csv("~/Desktop/logs/base2base30half/HELIOS_base.csv") |>
select(opp_point) |>
rename(base = opp_point)
# データフレームの結合
df <- bind_cols(df_epv, df_base)
long_data <- df %>%
gather(key = "Category", value = "Value", epv, base)
p <- long_data %>%
ggplot(aes(x = Category, y = Value)) +
geom_boxplot() +
scale_x_discrete(labels = c("HELIOS Base", "EPVエージェント")) +
scale_y_continuous(limits = c(0, 4.5)) +
stat_summary(fun = mean, geom = "point", shape = 20, size = 3, color = "red") +
xlab("エージェント") +
ylab("失点")
ggsave("opp_point.pdf", p, device = cairo_pdf, width = 3, height = 3)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment