Skip to content

Latest commit

 

History

History
44 lines (33 loc) · 931 Bytes

index.rst

File metadata and controls

44 lines (33 loc) · 931 Bytes

A Grammar of Graphics for Python

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 are easy to think about and then create, while the simple plots remain simple.

Example

(ggplot(mtcars, aes('wt', 'mpg', color='factor(gear)'))
 + geom_point())
 + stat_smooth(method='lm')
 + facet_wrap('~gear'))

Documentation

api installation gallery changelog about-plotnine external-resources tutorials