Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Suggestion for Rasterization to docs pgf-backend #5984
Conversation
mdboom
added the
needs_review
label
Feb 9, 2016
tacaswell
added this to the
1.5.2 (Critical bug fix release)
milestone
Feb 9, 2016
tacaswell
added the
Documentation
label
Feb 9, 2016
|
Attn: @pwuertz |
|
This advice is universal for any kind of vector file format for any environment, i.e. it isn't exactly a problem specific to PGF. I don't object to adding it to the documentation, I'm just wondering if there is a suitable place upwards in the hierarchy to indicate matplotlibs selective rasterization solution for high geometry count in vector graphics. On the other hand, TeX probably isn't particularly optimized for such situations, so if it breaks down magnitudes earlier than your typical SVG or PDF renderer please go ahead. |
QuLogic
commented on an outdated diff
Feb 9, 2016
| @@ -160,7 +160,17 @@ Troubleshooting | ||
| in yout LaTeX document, the alignment of text elements in imported figures | ||
| may be off. Check the header of your ``.pgf`` file if you are unsure about | ||
| the fonts matplotlib used for the layout. | ||
| - | ||
| + | ||
| +* Vector images and hence ``.pgf`` files can become bloated if there are a lot | ||
| + of objects in the graph. This can be the case for image processing or very | ||
| + big scatter graphs. In an extreme case this can cause TeX to run out of | ||
| + memory: "TeX capacity exceeded, sorry" You can configure latex to increase | ||
| + the amount of memory available to generate the ``.pdf`` image as discussed on | ||
| + `tex.stackexchange.com <http://tex.stackexchange.com/questions/7953>`_. | ||
| + Another way would be to "rasterize" parts of the graph causing problems | ||
| + using either the ``rasterize=True`` keyword, or ``.set_rasterized(True)`` as per |
|
|
|
I agree with @pwuertz that this info should be highlighted more generally for the vector backends. Maybe it could become an entry in the FAQ, something like "how to make smaller, faster-rendering files in ps, pdf, pgf and svg formats". I'm not sure whether that is the best place. This ability of mpl to rasterize on a per-artist basis is an important feature that can make the difference between an excellent file and an unusable one. |
|
@QuLogic good spot! I changed it accordingly. Even though i feel a little like I am commit-spamming at this point... Until now I was just using githubs editor to make the changes. To edit two files at once I actually downloaded the source; but as I am on holiday with a slow internet connection it took a while and it's getting late. |
|
In that case, please be sure you configured your Also, if you wish to squash the commits, then you may do a rebase. |
|
@QuLogic, I'm pretty sure a rebase will not squash the commits.... a --squash commit would, but I think i'd just leave it at this to be honest. My two other options are changing the branch history: dunno what would happend to this thread, make a new branch with a single commit and a new pull request: seems too much effort for something minor. |
|
@overdetermined The travis failure is a random fluke in a test that depends on timing and is somewhat unstable |
|
The pull request tracks the branch, not the commits. So, squashing won't In your case, I am meh on whether or not to squash your commits. It would On Wed, Feb 10, 2016 at 4:37 AM, Jens Hedegaard Nielsen <
|
|
@WeatherGod Squashed the commits. @QuLogic you can indeed use rebase to squash the commits sorry for doubting you ;-). I used "git reset --soft HEAD~5" though. |
tacaswell
commented on the diff
Feb 14, 2016
| @@ -160,7 +160,17 @@ Troubleshooting | ||
| in yout LaTeX document, the alignment of text elements in imported figures | ||
| may be off. Check the header of your ``.pgf`` file if you are unsure about | ||
| the fonts matplotlib used for the layout. | ||
| - | ||
| + | ||
| +* Vector images and hence ``.pgf`` files can become bloated if there are a lot | ||
| + of objects in the graph. This can be the case for image processing or very | ||
| + big scatter graphs. In an extreme case this can cause TeX to run out of | ||
| + memory: "TeX capacity exceeded, sorry" You can configure latex to increase | ||
| + the amount of memory available to generate the ``.pdf`` image as discussed on | ||
| + `tex.stackexchange.com <http://tex.stackexchange.com/questions/7953>`_. |
tacaswell
Owner
|
tacaswell
added a commit
that referenced
this pull request
Feb 22, 2016
|
|
tacaswell |
f555fec
|
tacaswell
merged commit f555fec
into matplotlib:master
Feb 22, 2016
tacaswell
removed the
needs_review
label
Feb 22, 2016
tacaswell
added a commit
that referenced
this pull request
Feb 23, 2016
|
|
tacaswell |
851f25c
|
|
backported to v1.5.1-doc as 851f25c |
overdetermined commentedFeb 9, 2016
As per discussion on issue:
#5983