data(firms)
str(firms)
summary(firms)
if (requireNamespace("ggplot2", quietly = TRUE)) {
ggplot2::ggplot(firms, ggplot2::aes(x = employees, y = operating_income)) +
ggplot2::geom_point(alpha = 0.6) +
ggplot2::labs(
x = "Number of employees",
y = "Operating income (millions of euros)",
title = "Spanish Food Industry Firms (2023)"
) +
ggplot2::theme_minimal() +
ggplot2::theme(
plot.title = ggplot2::element_text(face = "bold"),
axis.line = ggplot2::element_line(color = "black"),
axis.ticks = ggplot2::element_line(color = "black"),
panel.grid.minor = ggplot2::element_blank()
)
}
Run the code above in your browser using DataLab