I have the following:
require(ggplot2)
p <- ggplot() # don't put aes() here, do it separately
df <- data.frame(x=X, y=Y) # ggplot requires dataframes
p <- p + geom_line(data=df, aes(x=X, y=Y))
# Now we plot the graphs using ggplots and color the segments
p <- p + geom_rect(data=peaks,
aes(xmin=xstart, xmax=xend,
ymin = -Inf, ymax = Inf,
fill = col),
alpha=0.4)
# Open the graphical window for displaying the graph
quartz()
print(p)
message("Press Return To Continue")
invisible(readLines("stdin", n=1))
The last line ensures that my graphing window doesn't open and shut as the script terminates. This works fine, except that I can't resize the graphing window when it shows up. My cursor is spinning indefinitely.
Aside from manually specifying the window frame in quartz()
, is there any way for me to resize my graphing window?