0

I'm trying to save a rather large ggpairs file. For some reason I can't get ggsave to work on my device (the file is created but it's blank no matter the plot, file type etc.) so I have been manually right clicking on save image as on the output.

However the resolution is so poor you can't read the correlation information as I've had to reduce the font size.

Appreciate any suggestions on how to get out a readable output.

TIPI_data<- vms_data[, c("cond","group_aff","personal_exp","outcomes","mechanics", "TIPI_O", "TIPI_C", "TIPI_E","TIPI_A","TIPI_N")]

ggpairs(TIPI_data, ggplot2::aes(colour=cond), upper = list(continuous = wrap("cor", size = 1.5)))
tamtam
  • 3,541
  • 1
  • 7
  • 21

1 Answers1

0

I don't know if this works for you, it worked for me. I have used this code to save as png with high resolution:

  corrPlot <- ggpairs(df, diag=list(continuous="density"), axisLabels='show')
  png(filename, height=1000, width=1000)
  print(corrPlot)
  dev.off()

I used this reference: https://github.com/tidyverse/ggplot2/issues/650#issuecomment-65086626

lucasb_256
  • 21
  • 3