Here is my R code:
# Create vectors for Stroman 2019 -- Mets
GScMets <- c(38,44,51,48,49,54,30,63,75,49,59,53)
GameMets <- c(1:12)
# Set line color and size
ggplot(gameGScMets, aes(x=GameMets, y=GScMets)) + geom_line(colour = "blue", size=1.2) + ggtitle("Marcus Stroman Mets Game Score by Game")
In the chart below, the values in the Y axis are appearing as 2.5, 5.0, 7.5, 10.0, 12.5. I want them to appear as 2, 4, 6, 8, 10, 12.
How can I do that?
Note: I changed my code to
ggplot(gameGScMets, aes(x=GameMets, y=GScMets)) + geom_line(colour = "blue", size=1.2) + ggtitle("Marcus Stroman Mets Game Score by Game") + scale_x_discrete(breaks = seq(2, 12, by=2))
which I saw used in another post, but that only caused no values to be displayed on my x-axis.