Hello André, Yes you are right, the compression is switched on by default. By mistake, i checked the size of a different file. I have to reduce the size of the input data to the plot.
PS: Sorry for the repeated replies. Regards Vignesh On Mon, Feb 24, 2020 at 5:01 PM Vignesh T G <[email protected]> wrote: > Hello Michael and André, > > Thank you for the replies and sorry for not providing an example. I was > able to reduce the file size using Michael's suggestion, and the script is > given below > > > j = graph.graphxy(width=8, height=8, > x=graph.axis.lin(title=r"$\Delta y/R_o$ "), > y=graph.axis.lin(title=r"$\Delta{V}/Uc$"), > ) > > j.plot([graph.data.values(x=x, y=v, > title=r"$\Delta y/R$")], > [graph.style.line([style.linestyle.dashed, style.linewidth.thin, > color.rgb.black])] > ) > j.writePDFfile('Eq_Behavior',write_compress=True) > > Regards > Vignesh > > > > On Mon, Feb 24, 2020 at 4:28 PM André Wobst <[email protected]> wrote: > >> Hi Vignesh, >> >> perfect answer by Michael already (thanks!). Just an additional remark: >> The default is to compress the page content stream and j.writePDFfile >> ('plot', write_compress=False) will disable the compression. So it will >> become even bigger, but allows you to view the content in an editor. >> Now, how to reduce the size? The only option is to try to reduce the >> amount of data to be included ... >> >> Best, >> >> >> André >> >> Am 24.02.20 um 11:40 schrieb Michael J Gruber via PyX-user: >> > Hi Vignesh >> > >> > You didn't provide a complete example, but I assume that your "j" is a >> > canvas.canvas instance, right? >> > The writePDFfile method of canvas creates a document.page and calls >> > document.document's writePFfile method for you. If you want to specify >> > keyword arguments for the latter when you use canvas.writePDFfile, >> > write them as "write_compress" etc. >> > >> > Michael >> > >> > Am Mo., 24. Feb. 2020 um 08:22 Uhr schrieb Vignesh T G < >> [email protected]>: >> >> >> >> Hello Pyx Development Team and users, >> >> >> >> I am generating a simple line plot using pyx in 'pdf' file format. >> Unfortunately, due to the data i have, the resulting file size is large. I >> found in the manual, about the 'compress' function in the module document >> but i don't know how to use it. Can someone help me in this regard? >> >> >> >> I tried "j.writePDFfile ('plot', compress=True, compresslevel=6)", >> but i get an error message stating there is "an unexpected argument >> compress and compresslevel" >> >> >> >> Thanks >> >> Vignesh TG >> >> _______________________________________________ >> >> PyX-user mailing list >> >> [email protected] >> >> https://lists.sourceforge.net/lists/listinfo/pyx-user >> > >> > >> > _______________________________________________ >> > PyX-user mailing list >> > [email protected] >> > https://lists.sourceforge.net/lists/listinfo/pyx-user >> > >> >> -- >> by _ _ _ >> / \ \ / ) Dr. André Wobst, [email protected], https://www.wobsta.de >> / _ \ \/\/ / wobsta GmbH, Amselweg 22, 85716 Unterschleißheim, Germany >> (_/ \_)_/\_/ Office: +49 (0)89 5480 3394, Mobile: +49 (0)160 9380 4217 >> >>
_______________________________________________ PyX-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pyx-user
