Reputation:
I am attempting to add titles to my plot. The main title is working, but I cannot seem to get the subtitle to work. I am shooting for the subtitle to be the same as the caption in ggplot2 (in the lower right hand corner). Here is my code:
called_strike_plot(PData, "2022 Probability of Called Strike", sub = "Baseball Savant")
I am receiving an error message of: Error in called_strike_plot(PData, "2022 Probability of Called Strike", : unused argument (sub = "Baseball Savant")
Upvotes: 0
Views: 159
Reputation: 26505
Based on the source code for called_strike_plot()
, the function calls geom_tile()
which will likely accept additional ggplot2 commands, i.e.
called_strike_plot(PData, "2022 Probability of Called Strike") +
labs(subtitle = "Baseball Savant")
Does that solve your problem?
Upvotes: 0