Science Score: 64.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: zenodo.org -
✓Committers with academic emails
7 of 112 committers (6.3%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.2%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
A Grammar of Graphics for Python
Basic Info
- Host: GitHub
- Owner: has2k1
- License: mit
- Language: Python
- Default Branch: main
- Homepage: https://plotnine.org
- Size: 159 MB
Statistics
- Stars: 4,334
- Watchers: 62
- Forks: 240
- Open Issues: 75
- Releases: 0
Topics
Metadata Files
README.md
plotnine 
plotnine is an implementation of a grammar of graphics in Python based on ggplot2. The grammar allows you to compose plots by explicitly mapping variables in a dataframe to the visual characteristics (position, color, size etc.) of objects that make up the plot.
Plotting with a grammar of graphics is powerful. Custom (and otherwise complex) plots are easy to think about and build incrementally, while the simple plots remain simple to create.
To learn more about how to use plotnine, check out the documentation. Since plotnine has an API similar to ggplot2, where it lacks in coverage the ggplot2 documentation may be helpful.
Example
python
from plotnine import *
from plotnine.data import mtcars
Building a complex plot piece by piece.
- Scatter plot
python
(
ggplot(mtcars, aes("wt", "mpg"))
+ geom_point()
)

- Scatter plot colored according some variable
python
(
ggplot(mtcars, aes("wt", "mpg", color="factor(gear)"))
+ geom_point()
)

- Scatter plot colored according some variable and smoothed with a linear model with confidence intervals.
python
(
ggplot(mtcars, aes("wt", "mpg", color="factor(gear)"))
+ geom_point()
+ stat_smooth(method="lm")
)

- Scatter plot colored according some variable, smoothed with a linear model with confidence intervals and plotted on separate panels.
python
(
ggplot(mtcars, aes("wt", "mpg", color="factor(gear)"))
+ geom_point()
+ stat_smooth(method="lm")
+ facet_wrap("gear")
)

- Adjust the themes
I) Make it playful
python
(
ggplot(mtcars, aes("wt", "mpg", color="factor(gear)"))
+ geom_point()
+ stat_smooth(method="lm")
+ facet_wrap("gear")
+ theme_xkcd()
)

II) Or professional
python
(
ggplot(mtcars, aes("wt", "mpg", color="factor(gear)"))
+ geom_point()
+ stat_smooth(method="lm")
+ facet_wrap("gear")
+ theme_tufte()
)

Installation
Official release
```console
Using pip
$ pip install plotnine # 1. should be sufficient for most $ pip install 'plotnine[extra]' # 2. includes extra/optional packages $ pip install 'plotnine[test]' # 3. testing $ pip install 'plotnine[doc]' # 4. generating docs $ pip install 'plotnine[dev]' # 5. development (making releases) $ pip install 'plotnine[all]' # 6. everything
Or using conda
$ conda install -c conda-forge plotnine
Or using pixi
$ pixi init name-of-my-project $ cd name-of-my-project $ pixi add python plotnine ```
Development version
console
$ 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:
- Simple looking plots that otherwise require a trick or two.
- 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.
console
$ pip install matplotlib --no-binary matplotlib
Otherwise there may be small differences in the text rendering that throw off the image comparisons.
Owner
- Name: Hassan Kibirige
- Login: has2k1
- Kind: user
- Location: Kampala, Uganda
- Twitter: HKibirige
- Repositories: 58
- Profile: https://github.com/has2k1
Citation (CITATION.bib)
@misc{plotnine,
author = {The plotnine development team},
title = {plotnine: A grammar of graphics for Python},
url = {https://github.com/has2k1/plotnine},
doi = {https://doi.org/10.5281/zenodo.1325308}
}
GitHub Events
Total
- Create event: 44
- Release event: 7
- Issues event: 120
- Watch event: 308
- Delete event: 36
- Issue comment event: 129
- Push event: 265
- Pull request review event: 2
- Pull request review comment event: 2
- Pull request event: 20
- Fork event: 25
Last Year
- Create event: 44
- Release event: 7
- Issues event: 120
- Watch event: 308
- Delete event: 36
- Issue comment event: 129
- Push event: 265
- Pull request review event: 2
- Pull request review comment event: 2
- Pull request event: 20
- Fork event: 25
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Hassan Kibirige | h****1@g****m | 1,756 |
| Greg Lamp | l****g@g****m | 177 |
| Jan Schulz | j****c@g****t | 87 |
| Greg | g****g@y****m | 70 |
| Greg | g****g@y****m | 43 |
| George A. Dowding | p****s@g****m | 27 |
| Florian Finkernagel | f****l@i****e | 22 |
| Tyler Funnell | t****l@g****m | 20 |
| Matthias Kümmerer | m****s@m****g | 20 |
| Jonas Arnfred | j****s@i****g | 15 |
| Austin Ogilvie | a****e@g****m | 15 |
| Dan Blanchard | d****d@e****g | 12 |
| stonebig | s****g | 11 |
| Paul Natsuo Kishimoto | m****l@p****e | 8 |
| Sergey Astanin | s****n@g****m | 7 |
| ericchiang | e****m@g****m | 6 |
| darthmall | w****n@g****m | 5 |
| Michael Chow | m****b@f****m | 4 |
| Bernard Willers | b****s@g****m | 4 |
| cosinequanon | s****r@d****m | 4 |
| Robert Gibboni | r****g@b****u | 4 |
| Jessie Frazelle | j****e | 3 |
| Simon Mutch | s****h@u****u | 3 |
| Yaroslav Halchenko | d****n@o****m | 3 |
| kalaidin | p****n@g****m | 3 |
| Jeroen Janssens | j****n@j****m | 3 |
| Josh Hartmann | j****1@g****m | 3 |
| zachcp | z****p@r****u | 2 |
| James Spencer | j****r@g****m | 2 |
| Hugo van Kemenade | h****k | 2 |
| and 82 more... | ||
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 279
- Total pull requests: 76
- Average time to close issues: 7 months
- Average time to close pull requests: 5 months
- Total issue authors: 178
- Total pull request authors: 32
- Average comments per issue: 2.0
- Average comments per pull request: 1.36
- Merged pull requests: 44
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 73
- Pull requests: 18
- Average time to close issues: 13 days
- Average time to close pull requests: 7 days
- Issue authors: 46
- Pull request authors: 7
- Average comments per issue: 0.85
- Average comments per pull request: 0.56
- Merged pull requests: 9
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- has2k1 (28)
- machow (15)
- AlFontal (6)
- wangjiawen2013 (6)
- jwhendy (5)
- Hoeze (4)
- ilia-kats (4)
- nick-youngblut (4)
- TerryGamon (4)
- penguinpee (4)
- wch (4)
- jrr96 (3)
- krassowski (3)
- floringogianu (3)
- kraxli (3)
Pull Request Authors
- has2k1 (20)
- krassowski (5)
- machow (5)
- TyberiusPrime (4)
- AlFontal (2)
- schackartk (2)
- ccravens (2)
- daylinmorgan (2)
- Emerentius (2)
- jwhendy (2)
- bhvieira (2)
- stettberger (2)
- fkgruber (2)
- kianmeng (2)
- EvaMaeRey (2)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 16
-
Total downloads:
- pypi 2,132,510 last-month
- Total docker downloads: 3,578,343
-
Total dependent packages: 121
(may contain duplicates) -
Total dependent repositories: 1,386
(may contain duplicates) - Total versions: 144
- Total maintainers: 3
pypi.org: plotnine
A Grammar of Graphics for Python
- Documentation: https://plotnine.readthedocs.io/
- License: The MIT License (MIT) Copyright (c) 2022 Hassan Kibirige Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
Latest release: 0.15.0
published 7 months ago
Rankings
Maintainers (1)
alpine-v3.18: py3-plotnine
A grammar of graphics for Python
- Homepage: https://github.com/has2k1/plotnine
- License: MIT
-
Latest release: 0.10.1-r1
published almost 3 years ago
Rankings
Maintainers (1)
alpine-v3.18: py3-plotnine-pyc
Precompiled Python bytecode for py3-plotnine
- Homepage: https://github.com/has2k1/plotnine
- License: MIT
-
Latest release: 0.10.1-r1
published almost 3 years ago
Rankings
Maintainers (1)
proxy.golang.org: github.com/has2k1/plotnine
- Documentation: https://pkg.go.dev/github.com/has2k1/plotnine#section-documentation
- License: mit
-
Latest release: v0.15.0
published 7 months ago
Rankings
alpine-edge: py3-plotnine-pyc
Precompiled Python bytecode for py3-plotnine
- Homepage: https://github.com/has2k1/plotnine
- License: MIT
-
Latest release: 0.15.0-r0
published 7 months ago
Rankings
Maintainers (1)
alpine-edge: py3-plotnine
A grammar of graphics for Python
- Homepage: https://github.com/has2k1/plotnine
- License: MIT
-
Latest release: 0.15.0-r0
published 7 months ago
Rankings
Maintainers (1)
conda-forge.org: plotnine
- Homepage: https://github.com/has2k1/plotnine
- License: MIT
-
Latest release: 0.10.1
published over 3 years ago
Rankings
anaconda.org: plotnine
plotnine is an implementation of a grammar of graphics in Python based on ggplot2. The grammar allows you to compose plots by explicitly mapping variables in a dataframe to the visual objects that make up the plot.
- Homepage: https://github.com/has2k1/plotnine
- License: MIT
-
Latest release: 0.15.0
published 6 months ago
Rankings
alpine-v3.21: py3-plotnine-pyc
Precompiled Python bytecode for py3-plotnine
- Homepage: https://github.com/has2k1/plotnine
- License: MIT
-
Latest release: 0.14.3-r0
published about 1 year ago
Rankings
Maintainers (1)
alpine-v3.19: py3-plotnine-pyc
Precompiled Python bytecode for py3-plotnine
- Homepage: https://github.com/has2k1/plotnine
- License: MIT
-
Latest release: 0.12.4-r0
published over 2 years ago
Rankings
Maintainers (1)
alpine-v3.22: py3-plotnine
A grammar of graphics for Python
- Homepage: https://github.com/has2k1/plotnine
- License: MIT
-
Latest release: 0.14.5-r0
published about 1 year ago
Rankings
Maintainers (1)
alpine-v3.21: py3-plotnine
A grammar of graphics for Python
- Homepage: https://github.com/has2k1/plotnine
- License: MIT
-
Latest release: 0.14.3-r0
published about 1 year ago
Rankings
Maintainers (1)
alpine-v3.22: py3-plotnine-pyc
Precompiled Python bytecode for py3-plotnine
- Homepage: https://github.com/has2k1/plotnine
- License: MIT
-
Latest release: 0.14.5-r0
published about 1 year ago
Rankings
Maintainers (1)
alpine-v3.19: py3-plotnine
A grammar of graphics for Python
- Homepage: https://github.com/has2k1/plotnine
- License: MIT
-
Latest release: 0.12.4-r0
published over 2 years ago
Rankings
alpine-v3.20: py3-plotnine
A grammar of graphics for Python
- Homepage: https://github.com/has2k1/plotnine
- License: MIT
-
Latest release: 0.13.6-r0
published almost 2 years ago
Rankings
Maintainers (1)
alpine-v3.20: py3-plotnine-pyc
Precompiled Python bytecode for py3-plotnine
- Homepage: https://github.com/has2k1/plotnine
- License: MIT
-
Latest release: 0.13.6-r0
published almost 2 years ago
Rankings
Maintainers (1)
Dependencies
- adjustText *
- flake8 *
- geopandas *
- jupyter *
- nbsphinx *
- notebook *
- numpydoc >=0.9.1
- plotnine_examples *
- pytest-cov *
- scikit-learn *
- scikit-misc *
- sphinx >=3.0.0
- twine *
- wheel *
- plotnine_examples *
- adjustText *
- importlib_resources *
- jupyter *
- matplotlib *
- mizani *
- nbsphinx *
- numpydoc >=0.9.1
- pandas *
- plotnine_examples *
- scipy *
- sphinx >=3.0.0
- statsmodels *