cle
cleanplotlib
pypi i cleanplotlib
cle

cleanplotlib

📈 Minimalistic Matplotlib style

by Nico Schlömer

0.1.3 (see all)License:GPLv3
pypi i cleanplotlib
Readme

cleanplotlib

gh-actions Code style: black PyPI pyversions PyPi Version GitHub stars PyPi downloads

This package creates clean and beautiful plots like

dmsh

import cleanplotlib as cpl
import numpy

numpy.random.seed(0)

x0 = numpy.linspace(0.0, 3.0, 100)
y0 = x0 / (x0 + 1)
y0 += 0.1 * numpy.random.rand(len(y0))
cpl.plot(x0, y0, "no balacing")

x1 = numpy.linspace(0.0, 3.0, 100)
y1 = 1.5 * x1 / (x1 + 1)
y1 += 0.1 * numpy.random.rand(len(y1))
cpl.plot(x1, y1, "CRV-27")

x2 = numpy.linspace(0.0, 3.0, 100)
y2 = 1.6 * x2 / (x2 + 1)
y2 += 0.1 * numpy.random.rand(len(y2))
cpl.plot(x2, y2, "CRV-27*")

cpl.show()
# cpl.savefig("ex1.svg", transparent=True, bbox_inches="tight")

If the plot labels get crowded, cpl.multiplot arranged them for you:

import cleanplotlib as cpl
import numpy
numpy.random.seed(0)

x = numpy.linspace(0.0, 3.0, 100)
y0 = x / (x + 1)
y1 = 1.01 * x / (x + 1)
y2 = 1.03 * x / (x + 1)

cpl.multiplot(
    [x, x, x], [y0, y1, y2], ["no balancing", "CRV27", "CRV27*"]
)

cpl.show()

Further reading:

Testing

To run the cleanplotlib unit tests, check out this repository and type

pytest

License

This software is published under the GPLv3 license.

GitHub Stars

191

LAST COMMIT

8mos ago

MAINTAINERS

1

CONTRIBUTORS

1

OPEN ISSUES

0

OPEN PRs

0
VersionTagPublished
0.1.3
2yrs ago
0.1.2
2yrs ago
0.1.1
2yrs ago
0.1.0
2yrs ago
No alternatives found
No tutorials found
Add a tutorial