Skip to content

plot_directive seems to be partly ignoring plot_formats #2800

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

Closed
ibell opened this issue Feb 10, 2014 · 7 comments
Closed

plot_directive seems to be partly ignoring plot_formats #2800

ibell opened this issue Feb 10, 2014 · 7 comments

Comments

@ibell
Copy link

ibell commented Feb 10, 2014

I have a project with hundreds (~500) of figures that are generated by MPL. I have a command in the conf.py to tell MPL to only generate PNG files at 80 dpi

plot_formats = [('png',80)]

but when I run the build, I get an error like

C:\Users\Belli\Documents\Code\CoolProp\Web\Fluids\trans-2-Butene.rst:19: WARNING: image file not readable: Fluids\../_build/plot_directive/Fluids/trans-2-Butene-4.pdf

for every single figure in my project.

Of course the PDF isn't readable since it shouldn't be being checked in the first place! I believe this is a regression since 1.2 or so (not sure of the exact revision though).

Hope a guru can chime in with wisdom!

@tacaswell
Copy link
Member

What do you mean 'partly', it sounds like it is entirely ignoring it.

@tacaswell
Copy link
Member

And a quick search on the history, the only place it looks like anything related to plot_format got touched was in f4adec7 which is the massive 2to3 -> six switch. Before that it was touched in b8f2edc, 1e81528, and a205f54 but those are pre-1.2.0.

@mdboom Should probably take a look at this.

@ibell
Copy link
Author

ibell commented Feb 11, 2014

Well not entirely. It does in fact only include PNG files at 80 dpi, but
it still complains about the missing PDF files. So in that sense it is
somewhat following the request of the plot_formats command.

On Tue, Feb 11, 2014 at 3:24 PM, Thomas A Caswell
notifications@github.comwrote:

And a quick search on the history, the only place it looks like anything
related to plot_format got touched was in f4adec7f4adec7b569cfd0b30e0f8367ba8618b9e160f92which is the massive 2to3 -> six switch. Before that it was touched in
b8f2edchttps://github.com/matplotlib/matplotlib/commit/b8f2edcf4c6504ec2a6c887d2999ef6178d3d511,
1e815281e81528,
and a205f54a205f5460f13d47aa5b5fad662005c382dd096eebut those are pre-1.2.0.

@mdboom https://github.com/mdboom Should probably take a look at this.

Reply to this email directly or view it on GitHubhttps://github.com//issues/2800#issuecomment-34758438
.

@tacaswell
Copy link
Member

@mdboom I think this falls in your court. If not, who should I ping about this?

@mdboom mdboom self-assigned this Feb 26, 2014
@QuLogic
Copy link
Member

QuLogic commented Jul 6, 2014

FYI, this occurs because the default template includes a section for LaTeX which requests the .pdf files. Unfortunately, sphinx does not realize that images in the .. only: latex section can be ignored when building HTML. You can suppress this warning by specifying your own template with plot_template (though how compatible this will be with future or past versions, I do not know).

@tacaswell tacaswell added this to the v1.5.x milestone Jul 12, 2014
@tacaswell tacaswell modified the milestones: 2.1 (next point release), 2.2 (next next feature release) Oct 3, 2017
@mgeier
Copy link
Contributor

mgeier commented Mar 8, 2019

I believe this was fixed in #3530. A similar problem still exists for PNG files (or lack thereof), see #13633.

@QuLogic
Copy link
Member

QuLogic commented Apr 22, 2020

This should have been fixed by the above-mentioned PRs.

@QuLogic QuLogic closed this as completed Apr 22, 2020
@QuLogic QuLogic modified the milestones: needs sorting, v1.4.x Apr 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants