Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Combines plotnine and dppd

Project description

dppd_plotnine

Build status: Build Status
Documentation https://dppd_plotnine.readthedocs.io/en/latest/

dppd_plotnine combines the power of plotnine and dppd

It allows you to use code like this

   import numpy as np
   from dppd import dppd
   import dppd_plotnine
   from plotnine.data import mtcars
   import plotnine as p9
   dp, X = dppd()

   plot = (
      dp(mtcars)
      .assign(kwh=X.hp * 0.74)
      .categorize("cyl")
      .p9()
      .add_point(
            "cyl",
            "kwh",
            color="cyl",
            position=p9.position_jitter(height=0, random_state=500),
      )
      .add_errorbar(
            x="cyl",
            y="kwh_median",
            ymin="kwh_median",
            ymax="kwh_median",
            data=dp(X.data)
            .groupby("cyl")
            .summarize(("kwh", np.median, "kwh_median"))
            .pd,
      )
      .scale_color_manual(
            ["red", "blue", "purple"]
      )  # after pd, X is what it was before
      .pd
    )
    plot.save("test.png")
    

Example image

Please see our full documentation at https://dppd_plotnine.readthedocs.io/en/latest/ for more details of the straight and enhanced plotnine mappings available.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for dppd-plotnine, version 0.2.3
Filename, size File type Python version Upload date Hashes
Filename, size dppd_plotnine-0.2.3.tar.gz (238.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page