Hi, When qqnorm on a vector of length 10M+ I get a huge pdf file which cannot be loaded by acroread or evince. Any suggestions? (apart from sampling the data). Thanks. -- Sam Steingold (http://sds.podval.org/) on Ubuntu 11.10 (oneiric) X 11.0.11004000 http://mideasttruth.com http://honestreporting.com http://camera.org http://openvotingconsortium.org http://pmw.org.il http://thereligionofpeace.com A person without flaws probably lacks strengths either.
On Dec 21, 2011, at 4:10 PM, Sam Steingold wrote:> Hi, > When qqnorm on a vector of length 10M+ I get a huge pdf file which > cannot be loaded by acroread or evince. > Any suggestions? (apart from sampling the data). > Thanks.Depending upon what your end product needs to be, generate a png file instead of pdf. With a pdf, every data point consumes 'space' in the file, therefore increasing the file size. Two data points that exactly overlap each other consume twice the space of a single data point in the pdf. That is not the case with a png file which only has to store information on each pixel in the image. The key with the png is to create the file initially so that the resolution and size conform to your final product requirement without scaling, which tends to reduce the image quality. HTH, Marc Schwartz
On Dec 21, 2011, at 23:10 , Sam Steingold wrote:> Hi, > When qqnorm on a vector of length 10M+ I get a huge pdf file which > cannot be loaded by acroread or evince. > Any suggestions? (apart from sampling the data).Sample intelligently? Things like> qq <- seq(-4,4,,10001) > qqplot(qq,quantile(x,pnorm(qq)),type="l")or maybe> qqnorm(sort(x)[seq_along(x)%%100==50], type="l")(Those can likely be improved upon, but you get the picture.)> Thanks. > -- > Sam Steingold (http://sds.podval.org/) on Ubuntu 11.10 (oneiric) X 11.0.11004000 > http://mideasttruth.com http://honestreporting.com http://camera.org > http://openvotingconsortium.org http://pmw.org.il http://thereligionofpeace.com > A person without flaws probably lacks strengths either. > > ______________________________________________ > R-help at r-project.org 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.-- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
Sam Steingold <sds at gnu.org> writes:> Hi, > When qqnorm on a vector of length 10M+ I get a huge pdf file which > cannot be loaded by acroread or evince. > Any suggestions? (apart from sampling the data). > Thanks.Following the other suggestions, I did not notice mention of another trick for slimming down graphs of many points. viz. Do not plot points that substantially overlap:> xx <- rexp(1e05) > qq.results <- qqnorm(xx, plot.it=FALSE) > qq.slim <- unique(round(as.data.frame(qq.results),3)) > dim(qq.slim)[1] 10233 2> plot(qq.slim) >Choose the digits arg in round to be large enough to allow for points that do not overlap to be seen and small enough to slim down the number of plotted points. In the example above, 10233 vs 100000. HTH, Chuck -- Charles C. Berry Dept of Family/Preventive Medicine cberry at ucsd edu UC San Diego http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901
Chuck: A bad idea, I think: Rounding to unique values loses data density, while sampling preserves it (to display resolution -- also a form of rounding). -- Bert On Thu, Dec 22, 2011 at 11:10 AM, <cberry at tajo.ucsd.edu> wrote:> Sam Steingold <sds at gnu.org> writes: > >> Hi, >> When qqnorm on a vector of length 10M+ I get a huge pdf file which >> cannot be loaded by acroread or evince. >> Any suggestions? (apart from sampling the data). >> Thanks. > > Following the other suggestions, I did not notice mention of another > trick for slimming down graphs of many points. viz. > > Do not plot points that substantially overlap: > >> xx <- rexp(1e05) >> qq.results <- qqnorm(xx, plot.it=FALSE) >> qq.slim <- unique(round(as.data.frame(qq.results),3)) >> dim(qq.slim) > [1] 10233 ? ? 2 >> plot(qq.slim) >> > > Choose the digits arg in round to be large enough to allow for points that do not overlap > to be seen and small enough to slim down the number of plotted > points. In the example above, 10233 vs 100000. > > HTH, > > Chuck > > -- > Charles C. Berry ? ? ? ? ? ? ? ? ? ? ? ? ? ?Dept of Family/Preventive Medicine > cberry at ucsd edu ? ? ? ? ? ? ? ? ? ? ? ? ?UC San Diego > http://famprevmed.ucsd.edu/faculty/cberry/ ?La Jolla, San Diego 92093-0901 > > ______________________________________________ > R-help at r-project.org 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.-- Bert Gunter Genentech Nonclinical Biostatistics Internal Contact Info: Phone: 467-7374 Website: http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm