roughviz is a python visualization library for creating sketchy/hand-drawn styled charts.
Available Charts
- Bar (
roughviz.bar) - Horizontal Bar (
roughviz.barh) - Pie (
roughviz.pie) - Donut (
roughviz.donut)
Installation
pip install roughviz
API
roughviz.bar
Required
labels: Labels with which to construct chart.values: Values with which to construct chart.
roughviz.bar(df["ABC"], df["XYZ"])
Optional
axisFontSize[string]: Font-size for axes' labels. Default:'1rem'.axisRoughness[number]: Roughness for x & y axes. Default:0.5.axisStrokeWidth[number]: Stroke-width for x & y axes. Default:0.5.bowing[number]: Chart bowing. Default:0.color[string]: Color for each bar. Default:'skyblue'.fillStyle[string]: Bar fill-style.fillWeight[number]: Weight of inner paths' color. Default:0.5.font: Font-family to use. You can use0orgaeguto useGaegu, or1orindie flowerto useIndie Flower. Or feed it something else. Default:Gaegu.highlight[string]: Color for each bar on hover. Default:'coral'.innerStrokeWidth[number]: Stroke-width for paths inside bars. Default:1.labelFontSize[string]: Font-size for axes' labels. Default:'1rem'.padding[number]: Padding between bars. Default:0.1.roughness[number]: Roughness level of chart. Default:1.simplification[number]: Chart simplification. Default0.2.stroke[string]: Color of bars' stroke. Default:black.strokeWidth[number]: Size of bars' stroke. Default:1.title[string]: Chart title. Optional.titleFontSize[string]: Font-size for chart title. Default:'1rem'.tooltipFontSize[string]: Font-size for tooltip. Default:'0.95rem'.xLabel[string]: Label for x-axis.yLabel[string]: Label for y-axis.width[number]: Width of the chart (in pixels).height[number]: Height of the chart (in pixels).
roughviz.barh
Required
labels: Labels with which to construct chart.values: Values with which to construct chart.
roughviz.barh(df["ABC"], df["XYZ"])
Optional
axisFontSize[string]: Font-size for axes' labels. Default:'1rem'.axisRoughness[number]: Roughness for x & y axes. Default:0.5.axisStrokeWidth[number]: Stroke-width for x & y axes. Default:0.5.bowing[number]: Chart bowing. Default:0.color[string]: Color for each bar. Default:'skyblue'.fillStyle[string]: Bar fill-style.fillWeight[number]: Weight of inner paths' color. Default:0.5.font: Font-family to use. You can use0orgaeguto useGaegu, or1orindie flowerto useIndie Flower. Or feed it something else. Default:Gaegu.highlight[string]: Color for each bar on hover. Default:'coral'.innerStrokeWidth[number]: Stroke-width for paths inside bars. Default:1.labelFontSize[string]: Font-size for axes' labels. Default:'1rem'.padding[number]: Padding between bars. Default:0.1.roughness[number]: Roughness level of chart. Default:1.simplification[number]: Chart simplification. Default0.2.stroke[string]: Color of bars' stroke. Default:black.strokeWidth[number]: Size of bars' stroke. Default:1.title[string]: Chart title. Optional.titleFontSize[string]: Font-size for chart title. Default:'1rem'.tooltipFontSize[string]: Font-size for tooltip. Default:'0.95rem'.xLabel[string]: Label for x-axis.yLabel[string]: Label for y-axis.width[number]: Width of the chart (in pixels).height[number]: Height of the chart (in pixels).
roughviz.donut
Required
labels: Labels with which to construct chart.values: Values with which to construct chart.
roughviz.donut(df["ABC"], df["XYZ"])
Optional
bowing[number]: Chart bowing. Default:0.fillStyle[string]: Chart fill-style.fillWeight[number]: Weight of inner paths' color. Default:0.85.font: Font-family to use. You can use0orgaeguto useGaegu, or1orindie flowerto useIndie Flower. Or feed it something else. Default:Gaegu.highlight[string]: Color for each arc on hover. Default:'coral'.innerStrokeWidth[number]: Stroke-width for paths inside arcs. Default:0.75.roughness[number]: Roughness level of chart. Default:1.simplification[number]: Chart simplification. Default0.2.strokeWidth[number]: Size of bars' stroke. Default:1.title[string]: Chart title. Optional.titleFontSize[string]: Font-size for chart title. Default:'1rem'.tooltipFontSize[string]: Font-size for tooltip. Default:'0.95rem'.
roughviz.pie
Required
labels: Labels with which to construct chart.values: Values with which to construct chart.
roughviz.pie(df["ABC"], df["XYZ"])
Optional
bowing[number]: Chart bowing. Default:0.fillStyle[string]: Chart fill-style.fillWeight[number]: Weight of inner paths' color. Default:0.85.font: Font-family to use. You can use0orgaeguto useGaegu, or1orindie flowerto useIndie Flower. Or feed it something else. Default:Gaegu.highlight[string]: Color for each arc on hover. Default:'coral'.innerStrokeWidth[number]: Stroke-width for paths inside arcs. Default:0.75.roughness[number]: Roughness level of chart. Default:1.simplification[number]: Chart simplification. Default0.2.strokeWidth[number]: Size of bars' stroke. Default:1.title[string]: Chart title. Optional.titleFontSize[string]: Font-size for chart title. Default:'1rem'.tooltipFontSize[string]: Font-size for tooltip. Default:'0.95rem'.
Future Plans
- Exception Handling
- Add Chart: Histogram
- Add Chart: Scatter
- Add Chart: Bubble Chart
- Add Chart: Line
- Advance CSS control capabilities
Based on
License
MIT License
Copyright (c) 2019 Hannan Satopay
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Metadata
Release files for roughviz 4.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 | |
|---|---|---|---|---|
| roughviz-4.0.0.tar.gz | 5.0 kB | Without provenance | Details |
Release files / roughviz-4.0.0.tar.gz
| Download URL | roughviz-4.0.0.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
45cf1cafdc059e4062a13834c8a2245e6338965b63e2012eccbbb7236ad33d34
|
|
BLAKE2b-256 checksum How to use checksums |
6100bb1c1197abb8726232fe7dff9a6eb85150dc8102bb18fcaf92123fff8bf6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
|
Security for roughviz 4.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.