问题
I am plotting a graph using ggplot2
. It has background image as my screen wall paper I want to plot graph over it and render it as png
image.And I want my graph to fit on my computer screen.How can I do that.When I am plotting it scales the image to smaller to fit in the graph!!
b <-readPNG("ao.png")
p <- ggplot(mydata, aes(ms,x=x,y=-y)) + background_image(b) +
geom_path(color='blue') + geom_point(color='blue')
p
I am using this code, image is screen-shot of my screen and in the output it is scaled to fit into the graph!
回答1:
you could do something like
png(file="saving_plot1.jpeg",with=800,height=600) # check the parameters
p # your plot
dev.off()
or you could use the plot pane and then use "export"
来源:https://stackoverflow.com/questions/62670403/how-show-graph-on-full-screen