All Projects → has2k1 → Plotnine

has2k1 / Plotnine

Licence: gpl-2.0
A grammar of graphics for Python

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Plotnine

plottr
A flexible plotting and data analysis tool.
Stars: ✭ 32 (-98.89%)
Mutual labels:  data-analysis, plotting
Corner.py
Make some beautiful corner plots
Stars: ✭ 327 (-88.64%)
Mutual labels:  data-analysis, plotting
ggshakeR
An analysis and visualization R package that works with publicly available soccer data
Stars: ✭ 69 (-97.6%)
Mutual labels:  data-analysis, plotting
Tablesaw
Java dataframe and visualization library
Stars: ✭ 2,785 (-3.27%)
Mutual labels:  data-analysis, plotting
Gdl
GDL - GNU Data Language
Stars: ✭ 104 (-96.39%)
Mutual labels:  data-analysis, plotting
labplot
LabPlot is a FREE, open source and cross-platform Data Visualization and Analysis software accessible to everyone.
Stars: ✭ 107 (-96.28%)
Mutual labels:  data-analysis, plotting
EEGEdu
Interactive Brain Playground - Browser based tutorials on EEG with webbluetooth and muse
Stars: ✭ 91 (-96.84%)
Mutual labels:  data-analysis, plotting
AlphaPlot
📈 Application for statistical analysis and data visualization which can generate different types of publication quality 2D and 3D plots with extensive visual customization.
Stars: ✭ 140 (-95.14%)
Mutual labels:  data-analysis, plotting
Root
The official repository for ROOT: analyzing, storing and visualizing big data, scientifically
Stars: ✭ 1,377 (-52.17%)
Mutual labels:  data-analysis, graphics
Makie.jl
High level plotting on the GPU.
Stars: ✭ 791 (-72.53%)
Mutual labels:  graphics, plotting
Plotlyjs.jl
Julia library for plotting with plotly.js
Stars: ✭ 235 (-91.84%)
Mutual labels:  graphics, plotting
Aachartkit Swift
📈📊📱💻🖥️An elegant modern declarative data visualization chart framework for iOS, iPadOS and macOS. Extremely powerful, supports line, spline, area, areaspline, column, bar, pie, scatter, angular gauges, arearange, areasplinerange, columnrange, bubble, box plot, error bars, funnel, waterfall and polar chart types. 极其精美而又强大的跨平台数据可视化图表框架,支持柱状图、条形图、…
Stars: ✭ 1,962 (-31.85%)
Mutual labels:  data-analysis, graphics
Pandastable
Table analysis in Tkinter using pandas DataFrames.
Stars: ✭ 376 (-86.94%)
Mutual labels:  data-analysis, plotting
Gadfly.jl
Crafty statistical graphics for Julia.
Stars: ✭ 1,724 (-40.12%)
Mutual labels:  graphics, plotting
Matplotplusplus
Matplot++: A C++ Graphics Library for Data Visualization 📊🗾
Stars: ✭ 2,433 (-15.49%)
Mutual labels:  data-analysis, graphics
Sketch
Sketch have a lot of basic functions to develop a drawing app for iPhone. Anyone can easily create drawing iOS Application.
Stars: ✭ 229 (-92.05%)
Mutual labels:  graphics
Lsix
Like "ls", but for images. Shows thumbnails in terminal using sixel graphics.
Stars: ✭ 2,635 (-8.48%)
Mutual labels:  graphics
Flingengine
A Vulkan game engine with a focus on data oriented design
Stars: ✭ 239 (-91.7%)
Mutual labels:  graphics
Datav
📊https://datav.io is a modern APM, provide observability for your business, application and infrastructure. It's also a lightweight alternative to Grafana.
Stars: ✭ 2,757 (-4.24%)
Mutual labels:  data-analysis
Backtrader plotting
Plotting addon for backtrader to support Bokeh (and maybe more)
Stars: ✭ 226 (-92.15%)
Mutual labels:  plotting

plotnine

Latest Release release
License license
DOI doi
Build Status buildstatus
Coverage coverage
Documentation documentation

plotnine is an implementation of a grammar of graphics in Python, it is based on ggplot2. The grammar allows users to compose plots by explicitly mapping data to the visual objects that make up the plot.

Plotting with a grammar is powerful, it makes custom (and otherwise complex) plots easy to think about and then create, while the simple plots remain simple.

To find out about all building blocks that you can use to create a plot, check out the documentation. Since plotnine has an API similar to ggplot2, where we lack in coverage the ggplot2 documentation may be of some help.

Example

from plotnine import *
from plotnine.data import mtcars

Building a complex plot piece by piece.

  1. Scatter plot

    (ggplot(mtcars, aes('wt', 'mpg'))
     + geom_point())
    ./doc/images/readme-image-1.png
  2. Scatter plot colored according some variable

    (ggplot(mtcars, aes('wt', 'mpg', color='factor(gear)'))
     + geom_point())
    ./doc/images/readme-image-2.png
  3. Scatter plot colored according some variable and smoothed with a linear model with confidence intervals.

    (ggplot(mtcars, aes('wt', 'mpg', color='factor(gear)'))
     + geom_point()
     + stat_smooth(method='lm'))
    ./doc/images/readme-image-3.png
  4. Scatter plot colored according some variable, smoothed with a linear model with confidence intervals and plotted on separate panels.

    (ggplot(mtcars, aes('wt', 'mpg', color='factor(gear)'))
     + geom_point()
     + stat_smooth(method='lm')
     + facet_wrap('~gear'))
    ./doc/images/readme-image-4.png
  5. Adjust the themes

5.1 Make it playful

(ggplot(mtcars, aes('wt', 'mpg', color='factor(gear)'))
 + geom_point()
 + stat_smooth(method='lm')
 + facet_wrap('~gear')
 + theme_xkcd())
./doc/images/readme-image-5.png

5.2 Or professional

(ggplot(mtcars, aes('wt', 'mpg', color='factor(gear)'))
 + geom_point()
 + stat_smooth(method='lm')
 + facet_wrap('~gear')
 + theme_tufte())
./doc/images/readme-image-5alt.png

Installation

Official release

# Using pip
$ pip install plotnine         # 1. should be sufficient for most
$ pip install 'plotnine[all]'  # 2. includes extra/optional packages

# Or using conda
$ conda install -c conda-forge plotnine

Development version

$ pip install git+https://github.com/has2k1/plotnine.git

Contributing

Our documentation could use some examples, but we are looking for something a little bit special. We have two criteria:

  1. Simple looking plots that otherwise require a trick or two.
  2. Plots that are part of a data analytic narrative. That is, they provide some form of clarity showing off the geom, stat, ... at their differential best.

If you come up with something that meets those criteria, we would love to see it. See plotnine-examples.

If you discover a bug checkout the issues if it has not been reported, yet please file an issue.

And if you can fix a bug, your contribution is welcome.

Testing

Plotnine has tests that generate images which are compared to baseline images known to be correct. To generate images that are consistent across all systems you have to install matplotlib from source. You can do that with pip using the command.

$ pip install matplotlib --no-binary matplotlib

Otherwise there may be small differences in the text rendering that throw off the image comparisons.

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].