## Overview
A collection of plotting / coloring tools I've been using here and there. Finally I'm putting them into one place.
One safe place.
## Installation
Should be as simple as
pip install mikePlotLib
## SineBow - turn values into colours
### create an rgb sinebow that spans a portion of the color wheel between 0 and 100 with 1000 steps
from mikeplotlib.sineBow import SineBow
SB = SineBow(100, mapType='rgb')
### get the rgb tuple for value=57.1
SB.makeColor(57.1) # (0, 245, 9)
### get it as a #hex string
SB.makeColor(57.1, hexFormat=True) # #00f509
### get 25 colours evenly spaced over the region
cols = SB.getNColors(25)
## StackedbarGraph - code for making purdy stacked bar graphs
### Example usage 1
from stackedBarGraph import StackedBarGrapher()
SBG = StackedBarGrapher()
SBG.demo()
### Example usage 2
import numpy as np
from matplotlib import pyplot as plt
from stackedBarGraph import StackedBarGrapher
SBG = StackedBarGrapher()
d = np.array([[101.,0.,0.,0.,0.,0.,0.],
[92.,3.,0.,4.,5.,6.,0.],
[56.,7.,8.,9.,23.,4.,5.],
[81.,2.,4.,5.,32.,33.,4.],
[0.,45.,2.,3.,45.,67.,8.],
[99.,5.,0.,0.,0.,43.,56.]])
d_widths = [.5,1.,3.,2.,1.,2.]
d_labels = ["fred","julie","sam","peter","rob","baz"]
d_colors = ['#2166ac', '#fee090', '#fdbb84', '#fc8d59', '#e34a33', '#b30000', '#777777']
fig = plt.figure()
ax = fig.add_subplot(111)
SBG.stackedBarPlot(ax,
d,
d_colors,
xLabels=d_labels,
yTicks=7,
widths=d_widths,
scale=True
)
plt.title("Scaled bars with set widths")
fig.subplots_adjust(bottom=0.4)
plt.tight_layout()
plt.show()
plt.close(fig)
del fig
## cbCols - Easy access to the colorbrewer2.org maps
### Example usage 1 - see all available colours
from cb2cols import Cb2Cols as CB2
cb2 = CB2()
cb2.demo()
### Example usage 2 - the first three colours from qualset1
from cb2cols import Cb2Cols as CB2
cb2 = CB2()
col_set = "qualSet1"
colours = cb2.maps[col_set].values()[0:3]
## Help
If you experience any problems using mikePlotLib, open an [issue](https://github.com/minillinim/mikePlotLib/issues) on GitHub and tell us about it.
## Licence and referencing
Project home page, info on the source tree, documentation, issues and how to contribute, see http://github.com/minillinim/mikePlotLib
This software is currently unpublished
## Copyright
Copyright (c) 2014 Michael Imelfort. See LICENSE.txt for further details.
Metadata
Release files for mikePlotLib 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mikePlotLib-2.0.0.tar.gz | 20.8 kB | Without provenance | Details |
Release files / mikePlotLib-2.0.0.tar.gz
| Download URL | mikePlotLib-2.0.0.tar.gz |
|---|---|
| Size | 20.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
41147a5fe8032995045264b366fc2d94a6e8b1ed6a5f8604472a431a5fcdb4e9
|
|
BLAKE2b-256 checksum How to use checksums |
cabb0dae404168d992a7a98ab6119d7fbafc447587eb0286030284bf2019fc52
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for mikePlotLib 2.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.