igroffman commited on
Commit
d26cd82
·
verified ·
1 Parent(s): deec3e4

Update app.R

Browse files
Files changed (1) hide show
  1. app.R +4 -4
app.R CHANGED
@@ -1423,10 +1423,10 @@ create_tableau_movement_plot <- function(pitcher_df, pitch_colors) {
1423
  ggplot(df, aes(x = HorzBreak, y = InducedVertBreak)) +
1424
  geom_vline(xintercept = 0, color = "black", linewidth = 0.4) +
1425
  geom_hline(yintercept = 0, color = "black", linewidth = 0.4) +
1426
- geom_point(aes(fill = TaggedPitchType), size = 2.6, alpha = 1,
1427
  shape = 21, color = "black", stroke = 0.9) +
1428
  scale_fill_manual(values = pitch_colors, drop = FALSE) +
1429
- coord_cartesian(xlim = c(-30, 30), ylim = c(-30, 30)) +
1430
  labs(title = "Movement Profile", x = "HB", y = "IVB") +
1431
  theme_minimal() +
1432
  theme(
@@ -1656,7 +1656,7 @@ try({
1656
  if (!is.null(logo_grob)) {
1657
  # Place in the top-right corner of the HEADER BAR
1658
  # x=0.985 means right edge is near page edge; y=0.977 centers within the bar
1659
- pushViewport(viewport(x = 0.985, y = 0.977,
1660
  width = 0.10, height = 0.040,
1661
  just = c("right", "center")))
1662
  grid.draw(logo_grob)
@@ -1743,7 +1743,7 @@ if (!is.null(logo_grob)) {
1743
  print(loc_plot, newpage = FALSE)
1744
  popViewport()
1745
 
1746
- pushViewport(viewport(x = 0.228, y = 0.345, width = 0.41, height = 0.28))
1747
  print(mov_plot, newpage = FALSE)
1748
  popViewport()
1749
 
 
1423
  ggplot(df, aes(x = HorzBreak, y = InducedVertBreak)) +
1424
  geom_vline(xintercept = 0, color = "black", linewidth = 0.4) +
1425
  geom_hline(yintercept = 0, color = "black", linewidth = 0.4) +
1426
+ geom_point(aes(fill = TaggedPitchType), size = 2.4, alpha = 1,
1427
  shape = 21, color = "black", stroke = 0.9) +
1428
  scale_fill_manual(values = pitch_colors, drop = FALSE) +
1429
+ coord_cartesian(xlim = c(-35, 30), ylim = c(-30, 35)) +
1430
  labs(title = "Movement Profile", x = "HB", y = "IVB") +
1431
  theme_minimal() +
1432
  theme(
 
1656
  if (!is.null(logo_grob)) {
1657
  # Place in the top-right corner of the HEADER BAR
1658
  # x=0.985 means right edge is near page edge; y=0.977 centers within the bar
1659
+ pushViewport(viewport(x = 0.988, y = 0.977,
1660
  width = 0.10, height = 0.040,
1661
  just = c("right", "center")))
1662
  grid.draw(logo_grob)
 
1743
  print(loc_plot, newpage = FALSE)
1744
  popViewport()
1745
 
1746
+ pushViewport(viewport(x = 0.223, y = 0.345, width = 0.41, height = 0.29))
1747
  print(mov_plot, newpage = FALSE)
1748
  popViewport()
1749