79718984

Date: 2025-07-29 17:04:54
Score: 1
Natty:
Report link

Just to put a bow on this question, yes, as @stefan's comment above notes, for shapes 21-25, the size of the stroke (controlled by the stroke parameter) needs to a value > 0 for the strokes to be visible. See here for details: https://ggplot2.tidyverse.org/articles/ggplot2-specs.html#colour-and-fill-1. I believe the default is 0.5, which is pretty thin, so I'd suggest a value of 1+.

library(Lahman)
library(ggthemes)

team_wins <- filter(Teams, yearID > 1990 & yearID != 1994 & yearID !=2020,
                    franchID %in% c('NYM','WSN','ATL','PHI','FLA'))

graph1 = team_wins %>%
  ggplot(aes(x=W, y=attendance)) +
  geom_point(alpha = 0.7, 
stroke = 1, #<--KEY CHANGE
shape = 21, size = 4, 
             aes(color = factor(franchID),
                 fill = factor(franchID))) +
  theme_fivethirtyeight() +
  labs(title = "Wins by NL East Teams over Time",
       subtitle = "From 1980 Onward",
       x = "# of Wins",
       y = "Attendance",
       #color = "WSWin",
       caption = "Source: Lahman Data") +
  theme(axis.title = element_text(),
        text = element_text(family = "Trebuchet MS"),
        legend.text = element_text(size = 10)) +
  theme(legend.title = element_text(hjust = 0.5)) +
  scale_x_continuous(breaks = c(seq(55,110,5))) +
  scale_y_continuous(breaks = c(seq(0,5000000,1000000))) +
  scale_fill_manual(values = c("NYM" = "#002D72", 
                                "ATL" = "#CE1141",
                                "FLA" = "#00A3E0", 
                                "PHI" = "#E81828", 
                                "WSN" = "#14225A")) +

  scale_color_manual(values = c("NYM" = "#FF5910", 
                               "ATL" = "#13274F",
                               "FLA" = "#EF3340", 
                               "PHI" = "#FFFFFF", 
                               "WSN" = "#AB0003"))

graph1

A scatterplot showing wins vs. attendance data for baseball teams with the stroke and fill colors of the points resembling the franchise's colors.

Reasons:
  • Probably link only (1):
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @stefan's
  • Low reputation (0.5):
Posted by: Bajcz