I started working with correlation graphs in R markdown today, and unlike the rest of my graphs they are cut off in R markdown output. They remain cut off if I open them in a Notebook Output window, or if I copy and paste them to a different program. The only way I can see the whole graph is to call it in the console, view it in the Plots tab, and then zoom out on it. Any idea how to fix this? Code below. Thank you!
EDIT: The graph looks completely fine in the html knitr output.
df <- structure(list(C = c(0, 0, 1, 0, 1, 1, 0, 0, 0, 5, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0, 0, 1, 5, 0, 0, 0, 0, 8, 0, 0, 2, 0, 0, 1, 0,
0, 3, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 1, 0, 0, 2, 5, 0, 0, 17,
0, 9, 0, 1, 2, 5, 0, 0, 4, 1, 1, 0, 0, 1, 2, 0, 0, 16, 0, 19,
0, 1, 2, 1, 0, 0, 0, 0, 18, 0, 1, 1, 0, 0, 0, 13, 0, 8, 0, 0,
2, 0, 4, 0, 4, 1, 13, 0, 2, 2, 1, 0, 2, 17, 0, 2, 0, 4, 0, 0,
2, 0, 2, 0, 3, 0, 5, 2, 1, 1, 6, 11, 0, 2, 0, 1, 2, 0, 0, 0,
12, 0, 1, 0, 2, 6, 0, 3, 0, 1, 0, 4, 0, 0), P = c(0, 0, 0, 0,
0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 1, 0,
0, 0, 2, 0, 0, 2, 0, 3, 0, 0, 0, 7, 0, 0, 0, 0, 4, 2, 0, 0, 6,
0, 0, 0, 0, 2, 1, 0, 0, 8, 0, 1, 1, 0, 1, 7, 0, 0, 0, 0, 2, 0,
0, 0, 0, 0, 0, 0, 0, 24, 0, 2, 3, 0, 0, 0, 9, 0, 6, 0, 0, 0,
0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 7, 0, 2, 0, 0, 0, 0, 0, 0,
2, 0, 2, 0, 0, 0, 0, 0, 0, 25, 0, 8, 0, 4, 1, 0, 0, 1, 9, 0,
3, 0, 0, 0, 0, 0, 0, 18, 0, 1, 0, 1, 0, 0, 0, 0, 14, 0, 3, 0,
0)), class = c("tbl_df", "tbl", "data.frame"), row.names = c(NA,
-149L), .Names = c("C", "P"))
ccf(x = df$C, y = df$P,lag.max = 10)