Git Product home page Git Product logo

qbstyles's People

Contributors

caseyliqb avatar imdoroshenko avatar tsanikgr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qbstyles's Issues

Switch to new matplotlib 3.7 style registration mechanism

A new style registration mechanism was introduced in matplotlib 3.7 that simplifies distributing styles a lot:

Third-party packages can now distribute style files that are globally available as follows. Assume that a package is importable as import mypackage, with a mypackage/__init__.py module. Then a mypackage/presentation.mplstyle style sheet can be used as plt.style.use("mypackage.presentation").

See https://matplotlib.org/stable/users/prev_whats_new/whats_new_3.7.0.html#style-files-can-be-imported-from-third-party-packages, matplotlib/matplotlib#4781, matplotlib/matplotlib#24257

Tangentially related: #12

qbstyles not compatible with conda version of matplotlib

If I install matplotlib through anaconda, my project gives a type error for argument 2 in pyplot line 671. After uninstalling the conda version and reinstalling the pip version the themes work as expected.

I am using the Spyder IDE. The same error occurs when run from the anaconda console.

Style does not apply on first plot

I followed global installation instruction. The styles do not apply on the first plot I run. I need to re-run plt.style.use(['qb-common', 'qb-dark']) for it to work.

image

Unexpected behaviour when using mpl_style with plt.savefig()

Consider the following minimal working example which demonstrates unexpected behaviour when using qbstyles.mpl_style with plt.savefig():

import matplotlib.pyplot as plt
from qbstyles import mpl_style
mpl_style(dark=True)
a = [1,2,3,4,5]
plt.plot(a)
plt.savefig('filename.png')

The output image is missing most elements and does not have the qbstyle applied:
filename

BUG: qbstyles adds automatic axis ticks that are not consistent with the data displayed when one subplot is used

Same image with qbstyles activated and deactivated: x-axis and y-axis are not indexed properly in the first image

# LINE PLOT
def line_plot(ax):
    rng = np.random.RandomState(4)
    x = np.linspace(0, 10, 500)
    y = np.cumsum(rng.randn(500, 4), 0)
    ax.set_title('Line Graph')
    ax.set_xlabel('— Time')
    ax.set_ylabel('— Random values')
    ax.legend(['Bitcoin', 'Ethereum', 'Dollar', 'Oil'])
    ax.set_xlim([0, 10])
    ax.set_ylim([-20, 60])
    ax.plot(x, y)

fig, ax = plt.subplots(figsize=(16, 9))
line_plot(ax)

image
image

Current colour cycle not colourblind friendly

Problem:

  • Some of the colours are hard to differentiate for people with colour blindness/deficiency (e.g. 1 & 2 in the cycle for red-green)

Proposed solution:

Background material:

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.