Skip to main content

Automatically determine the best scaling for your scatterplot's colorbar.

Project description

ScatterScale

Automate the normalizing scale for your scatterplot's colorbar. Scaling options are Log, SymLog, Asinh, or no normalization, as defined by matplotlib.

To Install

pip install scatterscale

Quick Start

Scatterscale's get_scatterscale() function can be used to generate the matplotlib.color.Norm used for matplotlib plotting.

import scatterscale 
optimal_norm = get_scatterscale(data_for_colorbar)
plt.scatter(x_data, y_data, c=data_for_colorbar, norm=optimal_norm)
plt.show()

If you'd like to remove outliers from your data first, you can do so with handle_outliers() before running get_scatterscale().

data_for_colorbar_no_outliers = handle_outliers(data_for_colorbar, sigma_value=5, treatment="mask_out")
optimal_norm_no_outliers = get_scatterscale(data_for_colorbar)
plt.scatter(x_data, y_data, c=data_for_colorbar_no_outliers, norm=optimal_norm_no_outliers)
plt.show()

Tutorial

A tutorial notebook is provided in docs/tutorials/full_demo.ipynb, showing how scatterscale works for photometric test data.

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

scatterscale-1.0.1.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

scatterscale-1.0.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file scatterscale-1.0.1.tar.gz.

File metadata

  • Download URL: scatterscale-1.0.1.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for scatterscale-1.0.1.tar.gz
Algorithm Hash digest
SHA256 fa65db5c9fe6a71d51fc7480f4ac735b7a468b55955a319d0c21809f75bed44d
MD5 48f4873fe2a84ef1c3f291edb8e1d084
BLAKE2b-256 cb453fd994f99186da7eff0fde6126acc31f0823f090048a8155c15676157f63

See more details on using hashes here.

File details

Details for the file scatterscale-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: scatterscale-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for scatterscale-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1c0e5c5cd1cc4401c14cbf896424a820854a95cb427158d4af3141c4dd4fbcbb
MD5 d487478e5c5dc8b54b527d2c48ce64ba
BLAKE2b-256 58b99cc8ab9ef94b544aae149500326212705ffbc0ee0eb3056e162f3bd276f6

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