All Projects â†’ leotac â†’ joypy

leotac / joypy

Licence: MIT license
Joyplots in Python with matplotlib & pandas 📈

Programming Languages

Jupyter Notebook
11667 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to joypy

Pyplot.jl
Plotting for Julia based on matplotlib.pyplot
Stars: ✭ 347 (-16.99%)
Mutual labels:  matplotlib, plotting
Pandoc Plot
Render and include figures in Pandoc documents using your plotting toolkit of choice
Stars: ✭ 75 (-82.06%)
Mutual labels:  matplotlib, plotting
Chartpy
Easy to use Python API wrapper to plot charts with matplotlib, plotly, bokeh and more
Stars: ✭ 426 (+1.91%)
Mutual labels:  matplotlib, plotting
planetMagFields
Routines to plot magnetic fields of planets in our solar system
Stars: ✭ 27 (-93.54%)
Mutual labels:  matplotlib, plotting
EOmaps
A library to create interactive maps of geographical datasets
Stars: ✭ 193 (-53.83%)
Mutual labels:  matplotlib, plotting
Brokenaxes
Create matplotlib plots with broken axes
Stars: ✭ 266 (-36.36%)
Mutual labels:  matplotlib, plotting
Mplcyberpunk
"Cyberpunk style" for matplotlib plots
Stars: ✭ 762 (+82.3%)
Mutual labels:  matplotlib, plotting
cplot
🌈 Plot complex functions
Stars: ✭ 75 (-82.06%)
Mutual labels:  matplotlib, plotting
2021-bordeaux-dataviz
Scientific Visualization Crash Course (Python & Matplotlib)
Stars: ✭ 20 (-95.22%)
Mutual labels:  matplotlib, plotting
Scientific Visualization Book
An open access book on scientific visualization using python and matplotlib
Stars: ✭ 6,336 (+1415.79%)
Mutual labels:  matplotlib, plotting
Matplotlib Venn
Area-weighted venn-diagrams for Python/matplotlib
Stars: ✭ 260 (-37.8%)
Mutual labels:  matplotlib, plotting
dufte
📈 Minimalistic Matplotlib style
Stars: ✭ 196 (-53.11%)
Mutual labels:  matplotlib, plotting
Matplotlib
matplotlib: plotting with Python
Stars: ✭ 14,738 (+3425.84%)
Mutual labels:  matplotlib, plotting
Joypy
Joyplots in Python with matplotlib & pandas 📈
Stars: ✭ 322 (-22.97%)
Mutual labels:  matplotlib, plotting
microfilm
Creating figures and animations for multi-channel images with a focus on microscopy.
Stars: ✭ 22 (-94.74%)
Mutual labels:  matplotlib, plotting
Adjusttext
A small library for automatically adjustment of text position in matplotlib plots to minimize overlaps.
Stars: ✭ 731 (+74.88%)
Mutual labels:  matplotlib, plotting
SciPlot-PyQt
A Matplotlib-wrapped user-interface for creating and editing publication-ready images and plots
Stars: ✭ 32 (-92.34%)
Mutual labels:  matplotlib, plotting
geneview
Genomics data visualization in Python by using matplotlib.
Stars: ✭ 38 (-90.91%)
Mutual labels:  matplotlib, plotting
Cmasher
Scientific colormaps for making accessible, informative and 'cmashing' plots
Stars: ✭ 149 (-64.35%)
Mutual labels:  matplotlib, plotting
texfig
Utility to generate PGF vector files from Python's Matplotlib plots to use in LaTeX documents.
Stars: ✭ 58 (-86.12%)
Mutual labels:  matplotlib, plotting

JoyPy

PyPI version python version build status License: MIT Downloads

JoyPy is a one-function Python package based on matplotlib + pandas with a single purpose: drawing joyplots (a.k.a. ridgeline plots).

A joyplot.

The code for JoyPy borrows from the code for kdes in pandas.plotting, and uses a couple of utility functions therein.

What are joyplots?

Joyplots are stacked, partially overlapping density plots, simple as that. They are a nice way to plot data to visually compare distributions, especially those that change across one dimension (e.g., over time). Though hardly a new technique, they have become very popular lately thanks to the R package ggjoy (which is much better developed/maintained than this one -- and I strongly suggest you use that if you can use R and ggplot.) Update: the ggjoy package has now been renamed ggridges.

Why are they called joyplots?

If you don't know Joy Division, you are lucky: you can still listen to them for the first time! Here's a hint: google "Unknown Pleasures". This kind of plot is now also known as ridgeline plot, since the original name is controversial.

Documentation and examples

JoyPy has no real documentation. You're strongly encouraged to take a look at this jupyter notebook with a growing number of examples. Similarly, github issues may contain some wisdom :-)

A minimal example is the following:

import joypy
import pandas as pd

iris = pd.read_csv("data/iris.csv")
fig, axes = joypy.joyplot(iris)

By default, joypy.joyplot() will draw joyplot with a density subplot for each numeric column in the dataframe. The density is obtained with the gaussian_kde function of scipy.

Note: joyplot() returns n+1 axes, where n is the number of visible rows (subplots). Each subplot has its own axis, while the last axis (axes[-1]) is the one that is used for things such as plotting the background or changing xticks, and is the one you might need to play with in case you want to manually tweak something.

Dependencies

  • Python 3.5+
    Compatibility with python 2.7 has been dropped with release 0.2.0.

  • numpy

  • scipy >= 0.11

  • matplotlib

  • pandas >= 0.20 Warning: compatibility with pandas >= 0.25 requires joypy >= 0.2.1

Not sure what are the oldest supported versions. As long as you have somewhat recent versions, you should be fine.

Installation

It's actually on PyPI, because why not:

pip install joypy

To install from github, run:

git clone [email protected]:leotac/joypy.git
cd joypy
pip install .

License

Released under the MIT license.

Disclaimer + contributing

This is just a sunday afternoon hack, so no guarantees! If you want to contribute or just copy/fork, feel free to.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].