Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Ethan A Merritt Newsgroups: comp.graphics.apps.gnuplot Subject: Re: pdfcairo/pngcairo file size limitations? Date: Mon, 02 Oct 2017 09:18:52 -0700 Organization: A noiseless patient Spider Lines: 66 Message-ID: References: <413dce00-720f-411e-b421-007fc459f1dd@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit Injection-Date: Mon, 2 Oct 2017 16:18:55 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="58131df3553c55f414f4057c8a4d8851"; logging-data="23896"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX191R09fTzTl7I8QujJh15E3" User-Agent: KNode/4.14.10 Cancel-Lock: sha1:Dqa/sPZp+3ZzHGBPy7zcZNBq0qw= Xref: csiph.com comp.graphics.apps.gnuplot:3761 Karl Ratzsch wrote: > Am 28.09.2017 um 15:07 schrieb schwarz.cd48@gmail.com: >> gnuplot version 5.0 patchlevel 0 > >> I am trying to make a matrix plot of a file that is made up of 48 >> columns and 50000 lines. Each column contains integers between 0 - >> 140. I also want to produce a pdf in the end. The script for the plot >> looks like > >> plot 'data.file' u 1:2:3 matrix wi image >> >> The problem is that in the output.pdf the plot area/canvas is empty >> and only the xtics, ytics, and cbtics are shown. If I open gnuplot in >> the terminal and just do the plot in the standard qt terminal I will >> see the plot normally as expected, but it won't be produced in the >> pdf. The same goes for the pngcairo terminal. On the other hand, if I >> use >> >> set terminal postscript eps enhanced >> >> then the output.eps will contain the plot with no problems and I can >> convert eps to pdf. >> >> But why does the pdfcairo/pngcairo not work? >> >> I also found that if I reduce the number of lines in my 'data.file' >> from 50000 to 30000 (cutting off 2/5 of my data), then I will get a >> normal plot in my output.pdf. If I increase it again to 40000, the >> canvas will again be empty again. Does pdfcairo have some limitations >> here? > > > Yes, there is a problem. The following script produces a dataset > like yours and works on qt and windows terminal, crashes wxt, and > leaves an empty canvas with pdfcairo. (Tested on gp5.2pl0) > > > t=time(0) > n=40000 > m=48 > set print $dat;do for [i=1:n] { > s="" > do for [j=1:m] {s=s.sprintf(" %.2f",rand(0.))} > if (i%1000==0) {set print; print i." of ".n;set print $dat append} > print s} > set print > print time(0)-t > > plot $dat us 1:2:3 matrix w image Your test script fails here under linux, but it fails because the string in $dat gets too long. If I change it to write to a file then I see no problem. Tested with qt, wxt, pdfcairo terminals. On a system+terminal where you see problems, can it correctly process a large *.png or *.jpg image? Take some multi-megapixel photo and try displaying it with gnuplot> plot 'photo.jpeg' binary filetype=jpeg with rgbimage