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.9.tar.gz (13.5 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: dppd_plotnine-0.2.9.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for dppd_plotnine-0.2.9.tar.gz
Algorithm Hash digest
SHA256 528fde073c4b7cb7b82affe864ac028709c12d933b558ff518613366a985794d
MD5 e7d19d99d31751b1e42e1ed0284285ce
BLAKE2b-256 d09836f2ad0067a722b68ebff2f02fcee8fce51006b0992fc0f61001511a49c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for dppd_plotnine-0.2.9.tar.gz:

Publisher: pytest.yml on TyberiusPrime/dppd_plotnine

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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