Skip to content

aloytag/mpl-modernqt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mpl-modernqt

A modern looking backend for Matplotlib based on the official Qt backend. Its main features are:

  • Phosphor Icons (monochromatic) thanks to the QtAwesome package.
  • Modern theme with the PyQtDarkTheme package.
  • Qt5 and Qt6 support.

Screenshots

Matplotlib figure (main window)

Matplotlib figure (main window).

Figure settings

Figure settings.

Figure options

Figure options.

Installation

Using pip, the official Python package manager...

On GNU/Linux and MacOS execute the following order in a terminal:

pip install mpl-modernqt -U

On MS Windows you may prefer:

python -m pip install mpl-modernqt -U

Usage

from matplotlib import use

use('module://mpl_modernqt.backend')

Example code

import numpy as np
from matplotlib import use
import matplotlib.pyplot as plt

use('module://mpl_modernqt.backend')

x = np.linspace(0, 7, 300)
y = np.sin(x)

plt.plot(x, y)
plt.show()

License

This project uses the MIT license.