문제

I need to plot 50000 points on a single scatterplot using ggplot2 that I then need to be able to open in Illustrator in vector format (making figures for a paper).

There is no better way to display my data than a scatterplot, and I need to be able to show the individual points.

At the moment, I am outputting to pdf. The problem is that while I can open the file in Adobe Acrobat and Mac Preview, Illustrator hangs when "Reading PDF file", probably because there are just too many points for it to handle.

Should I be outputting to a different graphics device? Or is there a way I can use Acrobat Pro to selectively merge some of the data into layers or common paths to enable Illustrator to open the file?

Thanks in advance!

도움이 되었습니까?

해결책

Have you tried svg():

x<-runif(50000)
y<-runif(50000)

qplot(x,y,alpha=0.1)

svg("x.svg")
qplot(x,y,alpha=0.1)
dev.off() 
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top