Giter Club home page Giter Club logo

Comments (7)

philipphennig avatar philipphennig commented on May 21, 2024

Actually it would be nice to just have them as static np.arrays, not as functions, too. Saves a lot of typing.

from tueplots.

fsschneider avatar fsschneider commented on May 21, 2024

I think it would be great if we could also define a default color palette.

We could also use the default of matplotlib or seaborn, but I would prefer a custom one. A custom color palette would make our plots look much more recognizable. I guess @philipphennig you would have a preference for main, second, third, ... colors?

from tueplots.

philipphennig avatar philipphennig commented on May 21, 2024

I mean, the obvious choice is the Uni-TUE color palette. It works well for plots with up to three lines. But I realise that it may not be everyone's cup of tea. We could keep the default color palette as the default and offer the unitue palette as a replacement.

For what it's worth, I'm not a fan of seaborn. It's too heavy-handed for my taste.

from tueplots.

pnkraemer avatar pnkraemer commented on May 21, 2024

thanks for the great inputs! :)

The original reasoning behind using functions was that I dont really like a bunch of constants lying around the source. But I guess constants are more practical anyway -- let's see how far we get with that!
The original reasoning behind using tuples was that this way, the source is dependency-free. However, if we depend on matplotlib anyway (which has a numpy dependency, too), there is no real reason to avoid numpy arrays. So yes, we can change them into arrays.

Regarding the color palette: I think it is a great idea to add color palettes. How about not adding a default color palette, but a range of palettes so a user can choose freely without us imposing our tastes? I have some color cycles lying around (tue, probnum, tufte, etc.) which I can turn into rcParams inputs.

I suppose then it would make sense to branch out the color module:
color/
rgb/ # for RGB constants
cycles/ # for color cycles

from where on one can expand.

from tueplots.

pnkraemer avatar pnkraemer commented on May 21, 2024

See #5.

from tueplots.

philipphennig avatar philipphennig commented on May 21, 2024

Ok, great!

I think static constants are fine if they are within the namespace of the package. Numpy has np.pi, so it can't be that bad :)

from tueplots.

pnkraemer avatar pnkraemer commented on May 21, 2024

#13 introduces color constants.

from tueplots.

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.