I produced a line plot as:
ax.plot (x, y, '.') and saved as pdf. Both x and y were large vectors, resulting in a large pdf, and when incorporated into a LaTeX document, the resulting pdf takes a long time to open. Other than my manually decimating the vectors: ax.plot (x[::100], y[::100], '.') Is there some way within mpl to simplify plots? Or perhaps post-processing the pdf? Thanks, Neal Those who don't understand recursion are doomed to repeat it _______________________________________________ Matplotlib-users mailing list [hidden email] https://mail.python.org/mailman/listinfo/matplotlib-users |
I don't know if it is acceptable to you, but may be producing a png file
would be an option (latex would accept it). Regards, Juan El 10/2/20 a las 10:21 AM, Neal Becker escribió: > I produced a line plot as: > ax.plot (x, y, '.') > and saved as pdf. > > Both x and y were large vectors, resulting in a large pdf, and when > incorporated into a LaTeX document, the resulting pdf takes a long time > to open. > > Other than my manually decimating the vectors: > ax.plot (x[::100], y[::100], '.') > > Is there some way within mpl to simplify plots? Or perhaps > post-processing the pdf? > > Thanks, > Neal > > -- > /Those who don't understand recursion are doomed to repeat it/ > > _______________________________________________ > Matplotlib-users mailing list > [hidden email] > https://mail.python.org/mailman/listinfo/matplotlib-users > Matplotlib-users mailing list [hidden email] https://mail.python.org/mailman/listinfo/matplotlib-users |
Yes, I considered this. But to produce publication quality documents I've learned to avoid bitmap graphics. On Fri, Oct 2, 2020 at 9:40 AM fiolj <[hidden email]> wrote: I don't know if it is acceptable to you, but may be producing a png file Those who don't understand recursion are doomed to repeat it _______________________________________________ Matplotlib-users mailing list [hidden email] https://mail.python.org/mailman/listinfo/matplotlib-users |
How about rasterizing just the plot? plt.plot(x, y, rasterized=True) should work I think. пт, 2 окт. 2020 г. в 14:52, Neal Becker <[hidden email]>:
_______________________________________________ Matplotlib-users mailing list [hidden email] https://mail.python.org/mailman/listinfo/matplotlib-users |
In reply to this post by Neal Becker
Neal, Do you have line simplification turned on in your rcParams? https://matplotlib.org/3.3.2/tutorials/introductory/usage.html#line-segment-simplification -paul On Fri, Oct 2, 2020 at 6:22 AM Neal Becker <[hidden email]> wrote:
_______________________________________________ Matplotlib-users mailing list [hidden email] https://mail.python.org/mailman/listinfo/matplotlib-users |
I didn't change it from the default. Guess I could try changing 'path.simplify_threshold' On Fri, Oct 2, 2020 at 11:55 AM Paul Hobson <[hidden email]> wrote:
Those who don't understand recursion are doomed to repeat it _______________________________________________ Matplotlib-users mailing list [hidden email] https://mail.python.org/mailman/listinfo/matplotlib-users |
Free forum by Nabble | Edit this page |