-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
New style for fast plotting, updated performance docs #8957
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I tried looking for the "optimal" chunksize and it turns out that (at least on my laptop) the time per edge is minimized with a chunksize of ~1000 (see https://gist.github.com/anntzer/9192485c025933cc233f3a5dc74de936) -- which already seems quite large (even though it is possible to construct contrieved examples, in general I believe that a chunksize larger than the number of pixels (or more specifically, number-of-pixels / simplify-threshold) should cause only few visible artefacts (beyond what path simplification already caused)). Interestingly, mpl_cairo also exhibits a minimum around 1000 edges, and the time per vertex grows much more sharply after that. |
pixel perfect plots, then a value of ``1.0`` can be safely used. If you | ||
want to make sure your plot reflects your data *exactly*, then you should | ||
set ``path.simplify`` to false and/or ``path.simplify_threshold`` to ``0``. | ||
Currently, matplotlib defaults to a convervative value of ``1/9``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a version of this information should be in the core path
documentation so that it is easier to stumble upon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@has2k1 added in most recent commits
b2d135b
to
ddcbbeb
Compare
tutorials/introductory/usage.py
Outdated
# Using the *fast* style | ||
# ---------------------- | ||
# | ||
# The *fast* style that can be used to automatically set |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
grammar
tutorials/introductory/usage.py
Outdated
# # Setup, and create the data to plot | ||
# y = np.random.rand(100000) | ||
# y[50000:] *= 2 | ||
# y[np.logspace(1,np.log10(50000),400).astype(int)] = -1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spaces after commas
ddcbbeb
to
d3f6be4
Compare
d3f6be4
to
3c27100
Compare
Bump. Any desire to put this in? Or is it just adding noise to the package? |
Thanks for bumping this! |
PR Summary
PR Checklist