R - PNG has undesired vertical lines, plot doesn't -


i've been writing plot png. plot shows fine on screen, when png it, has random vertical lines in it.

further notes -

  1. i'm on windows 7, using "cairo-png" outputter. when switch "windows" outputter, lines go away, background ceases transparent.
  2. changing size of png changes lines appear on it.

from rstudio png export from rstudio png export png source: png source


specific code:

png(file="retirementriskrecommendation.png", w=800,h=500,units="px",bg="transparent",family="lato",type="cairo-png")     par(mar=c(5,7.1,3,7.1),bty="n")     barplot(t(as.matrix(other_aa[,-1])),space=0,border=na,             width=2,beside=false,col=bmt_cols[c(1,8)],axes=false,names.arg=rep("",length(other_times)))     axis(1,at=xats,labels=xlabs,cex.axis=axis.cexer,las=1)     axis(2,at=yats,labels=ylabs,cex.axis=axis.cexer,las=1)     axis(4,at=yats,labels=ylabs,cex.axis=axis.cexer,las=1)     #text(42,390000,label="retirement (much more)",las=1,cex=text.cexer,pos=4,col=goal_cols[2])     title(xlab="time until goal",las=1,cex.lab=legend.cexer)     title(main="general goal asset allocation on time",cex.main=legend.cexer, bty="n",col.main=bmt_cols[1],family="lato")     dev.off() 


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -