Re: Matplotlib-users Digest, Vol 63, Issue 4

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Matplotlib-users Digest, Vol 63, Issue 4

Thibaut Appel
If the output size of .pdf is your concern, I suggest you export your figure with matplotlib in .eps, and then use the command line tool « epstopdf » shipped with any LaTeX distribution.

The .pdf backend of matplotlib is far from being optimized.

I always observe a factor of size decrease between 10 and 100 (!) in the output .pdf after running epstopdf, instead of saving directly in .pdf.

Thibaut

> On 5 Oct 2020, at 18:00, [hidden email] wrote:
>
> 
> *******************
> This email originates from outside Imperial. Do not click on links and attachments unless you recognise the sender.
> If you trust the sender, add them to your safe senders list https://spam.ic.ac.uk/SpamConsole/Senders.aspx to disable email stamping for this address.
> *******************
> Send Matplotlib-users mailing list submissions to
>    [hidden email]
>
> To subscribe or unsubscribe via the World Wide Web, visit
>    https://mail.python.org/mailman/listinfo/matplotlib-users
> or, via email, send a message with subject or body 'help' to
>    [hidden email]
>
> You can reach the person managing the list at
>    [hidden email]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Matplotlib-users digest..."
>
>
> Today's Topics:
>
>   1. large pdf files (fiolj)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 5 Oct 2020 10:00:04 -0300
> From: fiolj <[hidden email]>
> To: matplotlib-users <[hidden email]>
> Subject: [Matplotlib-users] large pdf files
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset=windows-1252
>
> Hi, checking on sizes of pdf files I noticed that in my system currently
> pdf output are at least 370k when similar plots previously were about 20k.
>
> I tested with an old figure (I do not matplotlib version but was created
> about May 2019) and the figure was 15409 bytes while the same figure
> with matplotlib version 3.2.2 has a size of 429110 bytes.
> I checked and this happens even plotting a few (ten) points with line,
> everything using default values.
>
> My user configuration file has not been modified but my system may have
> changed.
>
> I've found similar reports but regarding much older versions.
>
> Any ideas?
>    Regards, Juan
>    
>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> Matplotlib-users mailing list
> [hidden email]
> https://mail.python.org/mailman/listinfo/matplotlib-users
>
>
> ------------------------------
>
> End of Matplotlib-users Digest, Vol 63, Issue 4
> ***********************************************
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: large pdf files

Thibaut Appel
If the output size of .pdf is your concern, I suggest you export your figure with matplotlib in .eps, and then use the command line tool « epstopdf » shipped with any LaTeX distribution.

The .pdf backend of matplotlib is far from being optimized.

I always observe a factor of size decrease between 10 and 100 (!) in the output .pdf after running epstopdf, instead of saving directly in pdf.

Thibaut
 

> From: fiolj <[hidden email]>
> To: matplotlib-users <[hidden email]>
> Subject: [Matplotlib-users] large pdf files
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset=windows-1252
>
> Hi, checking on sizes of pdf files I noticed that in my system currently
> pdf output are at least 370k when similar plots previously were about 20k.
>
> I tested with an old figure (I do not matplotlib version but was created
> about May 2019) and the figure was 15409 bytes while the same figure
> with matplotlib version 3.2.2 has a size of 429110 bytes.
> I checked and this happens even plotting a few (ten) points with line,
> everything using default values.
>
> My user configuration file has not been modified but my system may have
> changed.
>
> I've found similar reports but regarding much older versions.
>
> Any ideas?
>   Regards, Juan
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: large pdf files

matplotlib - users mailing list
Thanks Thibaut, using eps or other format is a good solution but I was
wondering about the change on file size. Usually, at least in my
experience in linux is that pdf export from matplotlib is very
efficient. In particular, very simple files were exported to small
files. I do not know what (if anything) changed from a few versions back
to the current version in my system (3.2.2) that the minimum file size I
can get now is about 370k.
Regards,
        Juan

El 10/5/20 a las 2:30 PM, Appel, Thibaut escribió:

> If the output size of .pdf is your concern, I suggest you export your figure with matplotlib in .eps, and then use the command line tool « epstopdf » shipped with any LaTeX distribution.
>
> The .pdf backend of matplotlib is far from being optimized.
>
> I always observe a factor of size decrease between 10 and 100 (!) in the output .pdf after running epstopdf, instead of saving directly in pdf.
>
> Thibaut
>  
>> From: fiolj <[hidden email]>
>> To: matplotlib-users <[hidden email]>
>> Subject: [Matplotlib-users] large pdf files
>> Message-ID: <[hidden email]>
>> Content-Type: text/plain; charset=windows-1252
>>
>> Hi, checking on sizes of pdf files I noticed that in my system currently
>> pdf output are at least 370k when similar plots previously were about 20k.
>>
>> I tested with an old figure (I do not matplotlib version but was created
>> about May 2019) and the figure was 15409 bytes while the same figure
>> with matplotlib version 3.2.2 has a size of 429110 bytes.
>> I checked and this happens even plotting a few (ten) points with line,
>> everything using default values.
>>
>> My user configuration file has not been modified but my system may have
>> changed.
>>
>> I've found similar reports but regarding much older versions.
>>
>> Any ideas?
>>   Regards, Juan
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users