Skip to main content

A Python package for chartly multiple plots.

Project description

chartly Package

GitHub license GitHub release (latest by date) GitHub issues GitHub pull requests GitHub contributors GitHub last commit GitHub commit activity GitHub top language GitHub search hit counter GitHub stars GitHub watchers

chartly is a simple plotting tool designed to help users create scientific plots with ease. Whether you want to test a distribution for normality or to plot contours onto a map of the globe, chartly can help you achieve your scientific plot with minimal effort. Chartly also allows users to plot multiple overlays and subplots onto the same figure.

Project Status

Here's the current status of our workflows:

Workflow Status
Testing Suite Continuous-Integration
Deployment Suite Continuous-Deployment
Sphinx Documentation Sphinx-docs
Guard Main Branch Guard Main Branch
Code Quality Checker Lint Codebase

Components

The chartly's codebase structure is as shown below:

.
├── chartly/
│   ├── base.py
│   ├── chartly.py
│   ├── charts.py
│   └── utilities.py
│   └── tests/
│   │   ├── __init__.py
│   │   └── test_chartly.py
├── docs/
│   ├── __init__.py
│   ├── source/
|   │   ├── conf.py
|   │   ├── index.rst
|   │   ├── Plot.rst
|   │   └── Multiplots.rst
├── requirements/
│   ├── testing.txt
│   ├── staging.txt
│   └── production.txt
├── LICENSE
├── MANIFEST.in
├── README.md
├── requirements.txt
├── setup.py
└── VERSION

Installation

To install chartly, run this command in your command line:

pip install chartly

Example

Scenario: After collecting data from a sample, an investigator wants to visualize the spread of his data, and also determine whether the sample data fits a normal distribution.

Here is how Chartly can help the investigator meet his goals.

from chartly import chartly
import numpy as np

"""Scatter the data"""

# 1.1 Initialize a figure to plot the scatter plot
args = {"super_title": "Scatter of the Sample Data", "super_xlabel": "X", "super_ylabel": "Y"}
chart = chartly.Chart(args)

# 1.2 Define data
x_range = np.arange(200)
sample_data =  np.random.randn(200)

# 1.3 Create Subplot and plot scatter plot
customs = {"color": "royalblue", "size": 50, "marker": "o"}
data = [x_range, sample_data]

chart.new_subplot({"plot": "scatter", "data": data, "customs": customs})

# 1.4 Display the figure
chart()

Example Output

"""Investigate the Distribution of the data using Chartly."""

# 2.1 Define main figure labels
args = {"super_title": "Investigating a Dataset's Distribution", "super_xlabel": "X", "super_ylabel": "Y", "share_axes": False}

# 2.2 initialize a new figure
chart = chartly.Chart(args)

# 2.3 Determine the distribution of the sample data using a dot plot, probability plot and a normal cdf plot.
plots = ["probability_plot", "dotplot", "normal_cdf"]

for plot in plots:
    chart.new_subplot({"plot": plot, "data": sample_data, "axes_labels": {"title": plot}})

# 2.4 Display the figure
chart()

Example Output

From the normal probability plot, we see that the line of best fit produced fits the data i.e. most of the points lie on or very close to the line. This suggests that the data has a normal distribution. This is supported by the dot plot, where the plot's shape resembles the bell curve shape distincitive to the normal distribution, and the normal CDF plot, where the CDF of the data falls very closely to the CDF we expect of a standard normal distribution.

However, if we look closely, we see that the points on the negative end of the plot are very light, suggesting that the data is negatively skewed. This is confirmed by the density plot, where we see that the more positive end of the distribution is heavier that its more negative end.

Given this, the investigator can conclude that the sample has a negatively skewed normal distribution, with a mean of 0.03 and a standard deviation of 0.96.

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

chartly-0.0.6.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chartly-0.0.6-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file chartly-0.0.6.tar.gz.

File metadata

  • Download URL: chartly-0.0.6.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for chartly-0.0.6.tar.gz
Algorithm Hash digest
SHA256 c3229f8fc8caff8b2698d6da73ef999d9b6056b0438b2c9e1f0d1c6e0efd6708
MD5 73e3ad7ca5704c617ccb6a1702d9aac7
BLAKE2b-256 79d61667ad3f991c19d21883ea9b2d2fa8a4e60347b0d8b4e2c36938838bf49d

See more details on using hashes here.

File details

Details for the file chartly-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: chartly-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 16.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for chartly-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 29a07be90b7dc6d25cb784ed27a2dd1641fe51780a24494cb9bba1afb219f335
MD5 e639ae798cedc31ba5197fe318160080
BLAKE2b-256 694f41a06caacce7f8d2d43cc678c41965aa136bad35afc2c994c3d4b9723bd2

See more details on using hashes here.

Supported by

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