How to save a plot in jpge or tiff format

30 views
Skip to first unread message

Eduardo Beche

unread,
Nov 24, 2023, 10:36:20 AM11/24/23
to R/qtl2 discussion
I am using a similar plot code below, I am trying to compile in the same plot multiple traits, but not sure how can I save the plot afterwards. 
par(mar=c(5.1, 4.1, 1.1, 1.1)) ymx <- maxlod(out_bin) plot(out_bin, map, lodcolumn=1, col="slateblue", ylim=c(0, ymx*1.02)) plot(out_bin, map, lodcolumn=2, col="violetred", add=TRUE) legend("topleft", lwd=2, col=c("slateblue", "violetred"), colnames(out_bin), bg="gray90")

Karl Broman

unread,
Nov 24, 2023, 11:22:01 AM11/24/23
to rqtl2...@googlegroups.com
Use a function such as jpeg() or png() in advance of your plotting functions, and then dev.off() afterwards.

karl

On Nov 24, 2023, at 9:36 AM, Eduardo Beche <> wrote:

I am using a similar plot code below, I am trying to compile in the same plot multiple traits, but not sure how can I save the plot afterwards. 
Reply all
Reply to author
Forward
0 new messages