Re: [R] [R-sig-Geo] plot() and Jpeg() increase font size and resolution
Herry, you need to set font size after opening a device; try after your example e.g. png(out.png) trellis.par.set(fontsize,fontsize) plt1 dev.off() Hth, -- Edzer [EMAIL PROTECTED] wrote: Hi Edzer, png also does not increase the file size. Following the commands. The data are located at ftp://ftp.csiro.au/Herry, file qldproperty.Rdata. trellis.par.get(fontsize)-fontsize fontsize$default-16 fontsize$points-16 fontsize$text-18 trellis.par.set(fontsize,fontsize) trellis.par.get(fontsize) plot(v1,plot.number=F, model=m2, ylim=c(4,9)) plt1-plot(v1,plot.number=F, model=m1, ylim=c(4,9), col=black, pch=+, scales=list(cex=1.5,)) jpeg(file=LOTPLAN_variogram_mod.png, bg=white, res=300, pointsize=16, width=800, height=800) plt1 dev.off() XXX SessionInfo: R version 2.4.0 (2006-10-03) i686-pc-linux-gnu locale: LC_CTYPE=en_US;LC_NUMERIC=C;LC_TIME=en_US;LC_COLLATE=en_US;LC_MONETARY=e n_US;LC_MESSAGES=en_US;LC_PAPER=en_US;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHON E=C;LC_MEASUREMENT=en_US;LC_IDENTIFICATION=C attached base packages: [1] methods stats graphics grDevices utils datasets [7] base other attached packages: geoRgstat MCMCpack MASS coda lattice 1.6-11 0.9-34 0.7-4 7.2-29 0.10-7 0.14-13 mcmc RColorBrewer maps maptools sp foreign 0.5-1 0.2-3 2.0-32 0.6-3 0.9-4 0.8-17 spatial 7.2-29 Thanks Herry Dr Alexander Herr Spatial and statistical analyst CSIRO, Sustainable Ecosystems Davies Laboratory, University Drive, Douglas, QLD 4814 Private Mail Bag, Aitkenvale, QLD 4814 Phone/www (07) 4753 8510; 4753 8650(fax) Home: http://herry.ausbats.org.au Webadmin ABS: http://ausbats.org.au Sustainable Ecosystems: http://www.cse.csiro.au/ -Original Message- From: Edzer J. Pebesma [mailto:[EMAIL PROTECTED] Sent: Monday, November 27, 2006 5:34 PM To: Herr, Alexander Herr - Herry (CSE, Townsville) Cc: r-help@stat.math.ethz.ch; r-sig-geo@stat.math.ethz.ch Subject: Re: [R-sig-Geo] plot() and Jpeg() increase font size and resolution [EMAIL PROTECTED] wrote: Thanks to Edzer and Roger, I can now plot with increased font sizes. However, jpeg still does not reproduce these, nor does it show up in high quality. What I would like to do is produce some highresolution jpegs. Please specify the commands that you used, preferrably such that we can reproduce them, and specify which worked and which didn't the way you expected. Also please give the output of sessionInfo(), and tell us the platform you work on. Have you tried producing png, did that work? -- Edzer Any help would be appreciated Thanx Herry R2.4 on Mandriva 10.2 linux. Dr Alexander Herr Spatial and statistical analyst CSIRO, Sustainable Ecosystems Davies Laboratory, University Drive, Douglas, QLD 4814 Private Mail Bag, Aitkenvale, QLD 4814 Phone/www (07) 4753 8510; 4753 8650(fax) Home: http://herry.ausbats.org.au Webadmin ABS: http://ausbats.org.au Sustainable Ecosystems: http://www.cse.csiro.au/ -Original Message- From: Edzer J. Pebesma [mailto:[EMAIL PROTECTED] Sent: Friday, November 24, 2006 5:37 PM To: Herr, Alexander Herr - Herry (CSE, Townsville) Cc: r-help@stat.math.ethz.ch; r-sig-geo@stat.math.ethz.ch Subject: Re: [R-sig-Geo] plot() and Jpeg() increase font size and resolution plotting variograms in gstat is done through xyplot in lattice; you'll find where it gets it's defaults by library(lattice) trellis.par.get() ?trellis.par.set -- Edzer [EMAIL PROTECTED] wrote: Dear list, I am having troubles increasing the fontize when plotting a variogram{gstat} and its model (vgm) with plot and using jpeg(). Also the resolution in the jpeg call does not work. I am using R2.4 on Mandriva 10.2 linux. I can change fontsize with cex.axis in a normal plot, so I presume it has to do with plotting the variogram model. Any help on how to increase the font size and resolution would be appreciated? R-calls: v1-variogram(log(z)~x+y, loc=coordinates(shp1),data=shp1) m1-vgm(0.0175, Gau, 20,0.052) jpeg(file=LOTPLAN_variogram_mod.jpg, bg=white, res=300, pointsize=16, width=1200, height=1200, quality=100) plot(v1,plot.number=F, model=m1, ylim=c(0.04,0.08), col=black, cex.axis=1.5) dev.off() Thanks Herry Dr Alexander Herr Spatial and statistical analyst CSIRO, Sustainable Ecosystems Davies Laboratory, University Drive, Douglas, QLD 4814 Private Mail Bag, Aitkenvale, QLD 4814 Phone/www (07) 4753 8510; 4753 8650(fax) Home: http://herry.ausbats.org.au Webadmin ABS: http://ausbats.org.au Sustainable Ecosystems: http://www.cse.csiro.au
Re: [R] [R-sig-Geo] plot() and Jpeg() increase font size and resolution
Hi Edzer, png also does not increase the file size. Following the commands. The data are located at ftp://ftp.csiro.au/Herry, file qldproperty.Rdata. trellis.par.get(fontsize)-fontsize fontsize$default-16 fontsize$points-16 fontsize$text-18 trellis.par.set(fontsize,fontsize) trellis.par.get(fontsize) plot(v1,plot.number=F, model=m2, ylim=c(4,9)) plt1-plot(v1,plot.number=F, model=m1, ylim=c(4,9), col=black, pch=+, scales=list(cex=1.5,)) jpeg(file=LOTPLAN_variogram_mod.png, bg=white, res=300, pointsize=16, width=800, height=800) plt1 dev.off() XXX SessionInfo: R version 2.4.0 (2006-10-03) i686-pc-linux-gnu locale: LC_CTYPE=en_US;LC_NUMERIC=C;LC_TIME=en_US;LC_COLLATE=en_US;LC_MONETARY=e n_US;LC_MESSAGES=en_US;LC_PAPER=en_US;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHON E=C;LC_MEASUREMENT=en_US;LC_IDENTIFICATION=C attached base packages: [1] methods stats graphics grDevices utils datasets [7] base other attached packages: geoRgstat MCMCpack MASS coda lattice 1.6-11 0.9-34 0.7-4 7.2-29 0.10-7 0.14-13 mcmc RColorBrewer maps maptools sp foreign 0.5-1 0.2-3 2.0-32 0.6-3 0.9-4 0.8-17 spatial 7.2-29 Thanks Herry Dr Alexander Herr Spatial and statistical analyst CSIRO, Sustainable Ecosystems Davies Laboratory, University Drive, Douglas, QLD 4814 Private Mail Bag, Aitkenvale, QLD 4814 Phone/www (07) 4753 8510; 4753 8650(fax) Home: http://herry.ausbats.org.au Webadmin ABS: http://ausbats.org.au Sustainable Ecosystems: http://www.cse.csiro.au/ -Original Message- From: Edzer J. Pebesma [mailto:[EMAIL PROTECTED] Sent: Monday, November 27, 2006 5:34 PM To: Herr, Alexander Herr - Herry (CSE, Townsville) Cc: r-help@stat.math.ethz.ch; r-sig-geo@stat.math.ethz.ch Subject: Re: [R-sig-Geo] plot() and Jpeg() increase font size and resolution [EMAIL PROTECTED] wrote: Thanks to Edzer and Roger, I can now plot with increased font sizes. However, jpeg still does not reproduce these, nor does it show up in high quality. What I would like to do is produce some highresolution jpegs. Please specify the commands that you used, preferrably such that we can reproduce them, and specify which worked and which didn't the way you expected. Also please give the output of sessionInfo(), and tell us the platform you work on. Have you tried producing png, did that work? -- Edzer Any help would be appreciated Thanx Herry R2.4 on Mandriva 10.2 linux. Dr Alexander Herr Spatial and statistical analyst CSIRO, Sustainable Ecosystems Davies Laboratory, University Drive, Douglas, QLD 4814 Private Mail Bag, Aitkenvale, QLD 4814 Phone/www (07) 4753 8510; 4753 8650(fax) Home: http://herry.ausbats.org.au Webadmin ABS: http://ausbats.org.au Sustainable Ecosystems: http://www.cse.csiro.au/ -Original Message- From: Edzer J. Pebesma [mailto:[EMAIL PROTECTED] Sent: Friday, November 24, 2006 5:37 PM To: Herr, Alexander Herr - Herry (CSE, Townsville) Cc: r-help@stat.math.ethz.ch; r-sig-geo@stat.math.ethz.ch Subject: Re: [R-sig-Geo] plot() and Jpeg() increase font size and resolution plotting variograms in gstat is done through xyplot in lattice; you'll find where it gets it's defaults by library(lattice) trellis.par.get() ?trellis.par.set -- Edzer [EMAIL PROTECTED] wrote: Dear list, I am having troubles increasing the fontize when plotting a variogram{gstat} and its model (vgm) with plot and using jpeg(). Also the resolution in the jpeg call does not work. I am using R2.4 on Mandriva 10.2 linux. I can change fontsize with cex.axis in a normal plot, so I presume it has to do with plotting the variogram model. Any help on how to increase the font size and resolution would be appreciated? R-calls: v1-variogram(log(z)~x+y, loc=coordinates(shp1),data=shp1) m1-vgm(0.0175, Gau, 20,0.052) jpeg(file=LOTPLAN_variogram_mod.jpg, bg=white, res=300, pointsize=16, width=1200, height=1200, quality=100) plot(v1,plot.number=F, model=m1, ylim=c(0.04,0.08), col=black, cex.axis=1.5) dev.off() Thanks Herry Dr Alexander Herr Spatial and statistical analyst CSIRO, Sustainable Ecosystems Davies Laboratory, University Drive, Douglas, QLD 4814 Private Mail Bag, Aitkenvale, QLD 4814 Phone/www (07) 4753 8510; 4753 8650(fax) Home: http://herry.ausbats.org.au Webadmin ABS: http://ausbats.org.au Sustainable Ecosystems: http://www.cse.csiro.au/ ___ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo ___ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Re: [R] [R-sig-Geo] plot() and Jpeg() increase font size and resolution
Thanks to Edzer and Roger, I can now plot with increased font sizes. However, jpeg still does not reproduce these, nor does it show up in high quality. What I would like to do is produce some highresolution jpegs. Any help would be appreciated Thanx Herry R2.4 on Mandriva 10.2 linux. Dr Alexander Herr Spatial and statistical analyst CSIRO, Sustainable Ecosystems Davies Laboratory, University Drive, Douglas, QLD 4814 Private Mail Bag, Aitkenvale, QLD 4814 Phone/www (07) 4753 8510; 4753 8650(fax) Home: http://herry.ausbats.org.au Webadmin ABS: http://ausbats.org.au Sustainable Ecosystems: http://www.cse.csiro.au/ -Original Message- From: Edzer J. Pebesma [mailto:[EMAIL PROTECTED] Sent: Friday, November 24, 2006 5:37 PM To: Herr, Alexander Herr - Herry (CSE, Townsville) Cc: r-help@stat.math.ethz.ch; r-sig-geo@stat.math.ethz.ch Subject: Re: [R-sig-Geo] plot() and Jpeg() increase font size and resolution plotting variograms in gstat is done through xyplot in lattice; you'll find where it gets it's defaults by library(lattice) trellis.par.get() ?trellis.par.set -- Edzer [EMAIL PROTECTED] wrote: Dear list, I am having troubles increasing the fontize when plotting a variogram{gstat} and its model (vgm) with plot and using jpeg(). Also the resolution in the jpeg call does not work. I am using R2.4 on Mandriva 10.2 linux. I can change fontsize with cex.axis in a normal plot, so I presume it has to do with plotting the variogram model. Any help on how to increase the font size and resolution would be appreciated? R-calls: v1-variogram(log(z)~x+y, loc=coordinates(shp1),data=shp1) m1-vgm(0.0175, Gau, 20,0.052) jpeg(file=LOTPLAN_variogram_mod.jpg, bg=white, res=300, pointsize=16, width=1200, height=1200, quality=100) plot(v1,plot.number=F, model=m1, ylim=c(0.04,0.08), col=black, cex.axis=1.5) dev.off() Thanks Herry Dr Alexander Herr Spatial and statistical analyst CSIRO, Sustainable Ecosystems Davies Laboratory, University Drive, Douglas, QLD 4814 Private Mail Bag, Aitkenvale, QLD 4814 Phone/www (07) 4753 8510; 4753 8650(fax) Home: http://herry.ausbats.org.au Webadmin ABS: http://ausbats.org.au Sustainable Ecosystems: http://www.cse.csiro.au/ ___ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] [R-sig-Geo] plot() and Jpeg() increase font size and resolution
[EMAIL PROTECTED] wrote: Thanks to Edzer and Roger, I can now plot with increased font sizes. However, jpeg still does not reproduce these, nor does it show up in high quality. What I would like to do is produce some highresolution jpegs. Please specify the commands that you used, preferrably such that we can reproduce them, and specify which worked and which didn't the way you expected. Also please give the output of sessionInfo(), and tell us the platform you work on. Have you tried producing png, did that work? -- Edzer Any help would be appreciated Thanx Herry R2.4 on Mandriva 10.2 linux. Dr Alexander Herr Spatial and statistical analyst CSIRO, Sustainable Ecosystems Davies Laboratory, University Drive, Douglas, QLD 4814 Private Mail Bag, Aitkenvale, QLD 4814 Phone/www (07) 4753 8510; 4753 8650(fax) Home: http://herry.ausbats.org.au Webadmin ABS: http://ausbats.org.au Sustainable Ecosystems: http://www.cse.csiro.au/ -Original Message- From: Edzer J. Pebesma [mailto:[EMAIL PROTECTED] Sent: Friday, November 24, 2006 5:37 PM To: Herr, Alexander Herr - Herry (CSE, Townsville) Cc: r-help@stat.math.ethz.ch; r-sig-geo@stat.math.ethz.ch Subject: Re: [R-sig-Geo] plot() and Jpeg() increase font size and resolution plotting variograms in gstat is done through xyplot in lattice; you'll find where it gets it's defaults by library(lattice) trellis.par.get() ?trellis.par.set -- Edzer [EMAIL PROTECTED] wrote: Dear list, I am having troubles increasing the fontize when plotting a variogram{gstat} and its model (vgm) with plot and using jpeg(). Also the resolution in the jpeg call does not work. I am using R2.4 on Mandriva 10.2 linux. I can change fontsize with cex.axis in a normal plot, so I presume it has to do with plotting the variogram model. Any help on how to increase the font size and resolution would be appreciated? R-calls: v1-variogram(log(z)~x+y, loc=coordinates(shp1),data=shp1) m1-vgm(0.0175, Gau, 20,0.052) jpeg(file=LOTPLAN_variogram_mod.jpg, bg=white, res=300, pointsize=16, width=1200, height=1200, quality=100) plot(v1,plot.number=F, model=m1, ylim=c(0.04,0.08), col=black, cex.axis=1.5) dev.off() Thanks Herry Dr Alexander Herr Spatial and statistical analyst CSIRO, Sustainable Ecosystems Davies Laboratory, University Drive, Douglas, QLD 4814 Private Mail Bag, Aitkenvale, QLD 4814 Phone/www (07) 4753 8510; 4753 8650(fax) Home: http://herry.ausbats.org.au Webadmin ABS: http://ausbats.org.au Sustainable Ecosystems: http://www.cse.csiro.au/ ___ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo ___ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] [R-sig-Geo] plot() and Jpeg() increase font size and resolution
On Fri, 24 Nov 2006 [EMAIL PROTECTED] wrote: Dear list, I am having troubles increasing the fontize when plotting a variogram{gstat} and its model (vgm) with plot and using jpeg(). Also the resolution in the jpeg call does not work. I am using R2.4 on Mandriva 10.2 linux. I can change fontsize with cex.axis in a normal plot, so I presume it has to do with plotting the variogram model. Any help on how to increase the font size and resolution would be appreciated? I believe that the underlying plot.gstatVariogram() method uses lattice graphics, not base graphics. So the problem is to find the right way of passing the parameter for xyplot(), and then see if plot.gstatVariogram() lets you do the same. df - data.frame(x=1:10, y=runif(10)) xyplot(y ~ x, df, scales=list(cex=3)) works, but data(meuse) vgm1 - variogram(log(zinc)~1, ~x+y, meuse) plot(vgm1, scales=list(cex=3)) unfortunately doesn't, so more exploration will be needed. I think the scales= argument is not passed through in the final brach to xyplot() in gstat:::plot.gstatVariogram(). From the examples: plot(v, group.id = FALSE, auto.key = TRUE, scales=list(cex=2)) works, but plot(vgm2, scales=list(cex=2)) doesn't. Roger R-calls: v1-variogram(log(z)~x+y, loc=coordinates(shp1),data=shp1) m1-vgm(0.0175, Gau, 20,0.052) jpeg(file=LOTPLAN_variogram_mod.jpg, bg=white, res=300, pointsize=16, width=1200, height=1200, quality=100) plot(v1,plot.number=F, model=m1, ylim=c(0.04,0.08), col=black, cex.axis=1.5) dev.off() Thanks Herry Dr Alexander Herr Spatial and statistical analyst CSIRO, Sustainable Ecosystems Davies Laboratory, University Drive, Douglas, QLD 4814 Private Mail Bag, Aitkenvale, QLD 4814 Phone/www (07) 4753 8510; 4753 8650(fax) Home: http://herry.ausbats.org.au Webadmin ABS: http://ausbats.org.au Sustainable Ecosystems: http://www.cse.csiro.au/ ___ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo -- Roger Bivand Economic Geography Section, Department of Economics, Norwegian School of Economics and Business Administration, Helleveien 30, N-5045 Bergen, Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43 e-mail: [EMAIL PROTECTED] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] [R-sig-Geo] plot() and Jpeg() increase font size and resolution
plotting variograms in gstat is done through xyplot in lattice; you'll find where it gets it's defaults by library(lattice) trellis.par.get() ?trellis.par.set -- Edzer [EMAIL PROTECTED] wrote: Dear list, I am having troubles increasing the fontize when plotting a variogram{gstat} and its model (vgm) with plot and using jpeg(). Also the resolution in the jpeg call does not work. I am using R2.4 on Mandriva 10.2 linux. I can change fontsize with cex.axis in a normal plot, so I presume it has to do with plotting the variogram model. Any help on how to increase the font size and resolution would be appreciated? R-calls: v1-variogram(log(z)~x+y, loc=coordinates(shp1),data=shp1) m1-vgm(0.0175, Gau, 20,0.052) jpeg(file=LOTPLAN_variogram_mod.jpg, bg=white, res=300, pointsize=16, width=1200, height=1200, quality=100) plot(v1,plot.number=F, model=m1, ylim=c(0.04,0.08), col=black, cex.axis=1.5) dev.off() Thanks Herry Dr Alexander Herr Spatial and statistical analyst CSIRO, Sustainable Ecosystems Davies Laboratory, University Drive, Douglas, QLD 4814 Private Mail Bag, Aitkenvale, QLD 4814 Phone/www (07) 4753 8510; 4753 8650(fax) Home: http://herry.ausbats.org.au Webadmin ABS: http://ausbats.org.au Sustainable Ecosystems: http://www.cse.csiro.au/ ___ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.