Giter Club home page Giter Club logo

Comments (4)

andrzejnovak avatar andrzejnovak commented on June 18, 2024

@andrewfowlie We used to have it setup that way, but it's not entirely kosher to directly modify another package's files. The fact that the .mplstyle files exist is an atavism of that approach. There's a helper function to copy the style files to mpl directory here https://github.com/scikit-hep/mplhep/blob/master/mplhep/tools.py#L6 though the styles may not be 100% up to date.

from mplhep.

andrewfowlie avatar andrewfowlie commented on June 18, 2024

I see - I didn’t realise that the mplstyles files had that status. The preferred methods for distributing and installing rc settings isn’t that clear from the matplotlib docs.

For the specific case in mind I wanted to call plt.style.use with a string rather than a dict and have access to a list of all available styles. Your copying functions will help.

from mplhep.

andrzejnovak avatar andrzejnovak commented on June 18, 2024

I don't think that's something originally thought of at mpl. What benefit do you get by calling say plt.style.use("ROOT") as opposed to plt.style.use(hep.style.ROOT) ?

from mplhep.

andrewfowlie avatar andrewfowlie commented on June 18, 2024

I have another code that plots some statistical quantities. The theme - default, classic, etc - is set by a string in a config file or selected through a GUI from the plt.styles.available list. Nothing important and unlikely to be a common problem :D

from mplhep.

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.