Skip to main content

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.

Source Distribution

dppd_plotnine-0.2.tar.gz (247.9 kB view details)

Uploaded Source

File details

Details for the file dppd_plotnine-0.2.tar.gz.

File metadata

  • Download URL: dppd_plotnine-0.2.tar.gz
  • Upload date:
  • Size: 247.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6

File hashes

Hashes for dppd_plotnine-0.2.tar.gz
Algorithm Hash digest
SHA256 726638d6d98a164409dead68ade6539ea9779c70ea5031e94945b7c2ec475995
MD5 5c393f90ff2f32707bde3cb895da4f4e
BLAKE2b-256 280b5a5c5c849f738acc5914fc72bed566c7fd0cef2fba7187536298eb602bc6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page