datascale

Functions for automatic scaling of matplotlib plot axes/resolution to data


Keywords
matplotlib, plotting, python, scaling-image
License
MIT
Install
pip install datascale==1.1.1

Documentation

datascale

Functions for automatic scaling of matplotlib line width, marker width, fontsize, and resolution to data


Downloads
PyPI version

Installation

pip install datascale

or

pip install git+https://github.com/benkrichman/datascale.git@main

Main Functions

plotdatasize()

Scale line width, marker width, or fontsize for plots to correspond directly to the scale of data on either/both plot axes. For more detail see help output:

help(datascale.plotdatasize)

plotdatasize() example

To reproduce this image view test() in datascale.py or use

datascale.test()

plotdatadpi()

Scale dpi of output image to produce a certain number of points per data unit on either/both plot axis/axes. Useful for plots that need a certain amount of detail per axis unit (e.g. geographic projections). For more detail see help output:

help(datascale.plotdatadpi)

plotdatadpi() example

To reproduce this image view test() in datascale.py or use

datascale.test()