-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[ENH]: Add a QtPgfPng backend? #28086
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
Comments
Seems reasonable. It looks like a majority of the work left writing a lot of docs? |
Yes (including explaining in what context that would be useful). Perhaps also set whatever attributes are needed to mark this as not supporting blitting. Also decide whether we also want the same for the other GUI toolkits (it's just busy work I suspect...). |
I'm not following why this is a desirable feature? |
Interactive figures are great for exploration or fine tuning (a semi-common workflow for me is to work in an IPython shell using the explicit API to poke at a live figure and then doing |
Fair, I just think the point of PGF is to write the plot in the PGF language for including in a (**)TeX document, so creating a very slow viewer for the compiled result seems out of scope. I appreciate that the code cost is low, but my concern is that it raises expectations and obscures the point of the PGF backend. |
This only uses public API, maybe the right path is to put this in a new very thin repo and see if it gets any usage? |
Sounds possible, or even as an example. BTW I'm not strongly opposed at all, just making sure we aren't adding a feature that we will later regret. |
Yes please, ever since #5234 indeed I have to workaround the fact interactive display is using latex and not the pgf engine (used to be xelatex at that time, but I’ve long switched to lualatex). So I would very much welcome such a backend. :) |
Problem
Per #28084 and a few other older similar issues, some users are confused because they cannot see pgf-generated plots (which can include xelatex/lualatex-specific latex constructs, in particular) interactively, as the interactive guis still use the "standard" latex support.
As it turns out it is relatively easy(?) to implement a minimal "interactive" backend that uses pgf and pdf->png to conversion to interactively display pgf-generated plots. Obviously it has the most terrible performance ever (each draw involves a full tex compilation of the image), but (per the above) it could have some uses...
Proposed solution
Minimum patch implementing the (minimally tested...) backend is below. Test e.g. by setting MPLBACKEND to qtpgfpng and plotting.
(#27913 (comment) is also relevant)
The text was updated successfully, but these errors were encountered: