Contents

matplotlib 3.8.4

0

Python plotting package

Python plotting package

Stars: 19315, Watchers: 19315, Forks: 7412, Open Issues: 1533

The matplotlib/matplotlib repo was created 13 years ago and the last code push was an hour ago.
The project is extremely popular with a mindblowing 19315 github stars!

How to Install matplotlib

You can install matplotlib using pip

pip install matplotlib

or add it to a project with poetry

poetry add matplotlib

Package Details

Author
John D. Hunter, Michael Droettboom
License
PSF
Homepage
https://matplotlib.org
PyPi:
https://pypi.org/project/matplotlib/
Documentation:
https://matplotlib.org
GitHub Repo:
https://github.com/matplotlib/matplotlib

Classifiers

  • Scientific/Engineering/Visualization
No  matplotlib  pypi packages just yet.

Errors

A list of common matplotlib errors.

Code Examples

Here are some matplotlib code examples and snippets.

  • ta code examples

    This python code example will show you how to use the ta python package to perform technical analysis on historical stock data such as RSI, SMA, Bollinger Bands, and Stochastic Oscillator.

  • Plot 3 different Pandas Dataframes in the same chart

    import pandas as pd import numpy as np from matplotlib import pyplot as plt #using numpy's randint to generate some data df1 = pd.DataFrame(np.random.randint(0,100,size=(10, 2)), columns=list('XY')) df2 = pd.DataFrame(np.random.randint(0,100,size=(10, 2)), columns=list('XY')) df3 = pd.DataFrame(np.random.randint(0,100,size=(10, 2)), columns=list('XY')) df1.head(), df2.head(), df3.head() ( X Y 0 82 32 1 79 13 2 87 19 3 6 73 4 1 38, X Y 0 47 62 1 41 0 2 98 78 3 63 83 4 31 59, X Y 0 57 25 1 49 27 2 9 29 3 93 75 4 23 80) # Get handle of first figure to pass to other plot() calls as ax ax = df1.
  • Use pandas and matplotlib to produce a chart of natural gas prices

    In this example Python code, we use requests to fetch data from the EIA.gov website and json from the Python standard library to parse the json data. Next, we load the daily prices into a Pandas DataFrame and format the date column and set it as the index. Finally, we use Pandas .plot() to create a chart saving it as a png image.

GitHub Issues

The matplotlib package has 1533 open issues on GitHub

  • Replace sole use of maxdict by lru_cache.
  • Backport PR #22077 on branch v3.5.x (Fix keyboard event routing in Tk backend (fixes #13484, #14081, and #22028))
  • Backport PR #22290 on branch v3.5.x (Respect position and group argument in Tk toolmanager add_toolitem)
  • Backport PR #22279 on branch v3.5.x (Remove Axes sublists from docs)
  • Backport PR #22293 on branch v3.5.x (Modify example for x-axis tick labels at the top)
  • Arbitrary toolbar customization hooks.
  • More standardization of floating point slop in mpl_toolkits.
  • Add a helper to generate xy coordinates for AxisArtistHelper.
  • Fix colorbar exponents
  • [Bug]: Wrong position of exponent label for extended colorbar
  • [Bug] set_3d_properties type error in Matplotlib 3.5.1
  • Added tests for ContourSet.legend_elements
  • [Bug]: Args for tripcolor
  • MNT: Deprecate cbook.maxdict
  • MNT: Remove cmap_d colormap access

See more issues on GitHub

Related Packages & Articles

keras 3.3.3

Keras is a deep learning API written in Python, running on top of the machine learning platform TensorFlow. The core data structures of Keras are layers and models. The philosophy is to keep simple things simple, while allowing the user to be fully in control when they need to (the ultimate control being the easy extensibility of the source code via subclassing).

gensim 4.3.2

Python framework for fast Vector Space Modelling