Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Description
Problem
In general, the process of producing a quality pgf file is confusing and not very intuitive to me. As a user, my ultimate goal is to be able to generate a pgf file that can be inputted into my own custom LaTeX document such that this final rendered plot looksidentical to how matplotlib renders it internally. This internal rendering is what decides the position of labels, ticks, etc. so it is important that there is perfect consistency between this first internal rendering and my second final rendering. Achieving this consistency is very difficult when using a customdocumentclass
. From what I understand, there's no way to set whatdocumentclass
is used for the internal rendering as it appears to be hard coded asarticle
. When using a complicateddocumentclass
, it can become nearly impossible to track down every package, etc. that is used.
Related:
#28112
#26892
#26893
#26791
#14637
Proposed solution
Is there any reason why thisdocumentclass
can't be provided by the user? I would suggest the following:
When saving a pgf, simply allow the user to specify an optionalpgf.documentclass
rcParam and usearticle
as the default. (I assume this needs to be done separately from thepgf.preamble
rcParam since it looks like matplotlib inserts other LaTeX commands between thedocumentclass
and user provided preamble, but I may be wrong.)