Giter VIP home page Giter VIP logo

Comments (7)

llorracc avatar llorracc commented on August 9, 2024

from hark.

sbenthall avatar sbenthall commented on August 9, 2024

It might be better to use .gitignore to suppress version control over the jpegs entirely.

from hark.

llorracc avatar llorracc commented on August 9, 2024

Matt,

As the original author of savefig, can you look into this? I'm puzzled that a lot more examples have not cropped up.

Also, my preference would be that whenever a figure is saved, it gets saved in jpg, pdf, svg, and png forms.

from hark.

mnwhite avatar mnwhite commented on August 9, 2024

from hark.

llorracc avatar llorracc commented on August 9, 2024

Well, I don't remember writing it either but as you say it was in a galaxy far far away so maybe I did.

I do remember adding some code to suppress metadata, but I think that that was in a version that saved all four kinds of figures automatically (jpg, svg, pdf, png) and I worked out how to suppress the metadata for all of them (because there would be no point in suppressing it for just one).

In any case, I'm puzzled that the problem has not cropped up for any of our REMARKs or other tests, so maybe none of them uses savefig. Actually, @edmundcrawley, can you point Matt to the place in the HAFiscal-Latest code where the savefig command is invoked, so he can see the content (I've just invited him as a collaborator on HAFiscal-Latest; please let Matt know the name of the branch you've been testing against HARK 0.13 on.)

from hark.

edmundcrawley avatar edmundcrawley commented on August 9, 2024

@mnwhite here is a minimal working example that shows the problem - that is probably easier than pointing you to the code in HAFiscal-Latest. Let me know if this doesn't work for you.

from HARK.utilities import make_figs
import matplotlib.pyplot as plt
import numpy as np

plt.figure()
plt.plot(np.linspace(1,5,40),np.linspace(4,8,40) )
make_figs('test', True , False, target_dir="C:/Downloads")
plt.show()

I get the error:

TypeError: print_jpg() got an unexpected keyword argument 'metadata'

from hark.

mnwhite avatar mnwhite commented on August 9, 2024

Thanks @edmundcrawley , that was a perfect example. I've made a PR that fixes this in #1386 and will merge ASAP, then try to do a minor release.

from hark.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.