Skip to main content

Seaborn-like API for some plotly plots

Project description

Bornly

Seaborn-like API for interactive plotly visualisations!

Installation

Note: the $ is not part of the command:

$ pip install -U bornly

Examples

Lineplot

import bornly as bns

fmri = bns.load_dataset("fmri")
bns.lineplot(data=fmri, x="timepoint", y="signal", hue="event")

lineplot

Barplot

import bornly as bns

tips = bns.load_dataset("tips")
bns.barplot(x="day", y="total_bill", data=tips, hue="time")

barplot

Scatterplot

import bornly as bns

diamonds = bns.load_dataset("diamonds")
bns.scatterplot(
    x="carat",
    y="price",
    hue="clarity",
    size="depth",
    palette="ch:r=-.2,d=.3_r",
    sizes=(1, 8),
    data=diamonds,
)

scatterplot

Kdeplot

import bornly as bns

iris = bns.load_dataset("iris")
bns.kdeplot(data=iris)

kdeplot

from string import ascii_letters
import numpy as np
import pandas as pd
import bornly as bns
import matplotlib.pyplot as plt

# Generate a large random dataset
rs = np.random.RandomState(33)
d = pd.DataFrame(data=rs.normal(size=(100, 26)), columns=list(ascii_letters[26:]))
# Compute the correlation matrix
corr = d.corr()
# Generate a mask for the upper triangle
mask = np.triu(np.ones_like(corr, dtype=bool))
# Generate a custom diverging colormap
cmap = bns.diverging_palette(230, 20, as_cmap=True)
# Draw the heatmap with the mask and correct aspect ratio
bns.heatmap(corr, mask=mask, cmap=cmap, vmax=0.3, center=0)

heatmap

Pairplot

import bornly as bns

penguins = bns.load_dataset("penguins")
bns.pairplot(penguins, hue="species")

pairplot

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

bornly-0.2.2.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

bornly-0.2.2-py3-none-any.whl (317.4 kB view details)

Uploaded Python 3

File details

Details for the file bornly-0.2.2.tar.gz.

File metadata

  • Download URL: bornly-0.2.2.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.5

File hashes

Hashes for bornly-0.2.2.tar.gz
Algorithm Hash digest
SHA256 2b3d147c15d812bf176c9256d43bc22142ae021e0247978d4f6f2b9da912c361
MD5 797f297065849765a3cb4964684f07d5
BLAKE2b-256 044e6eb1f38df4e9c15e515dc9d118e6bc66d09c8612f20a2c90e78c1303d8cb

See more details on using hashes here.

Provenance

File details

Details for the file bornly-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: bornly-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 317.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.5

File hashes

Hashes for bornly-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 37c540a6c4b4e03033d81642492404f1559b1ba41daea87822f4609a4cd41efd
MD5 08a47eafc6435eccee27dca4b5a11c9f
BLAKE2b-256 cd81c1c5ee24322debea81e8a4d177a6d2489c0049ab45b8c5c1056aeeaa105f

See more details on using hashes here.

Provenance

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