Skip to main content

Python package that produces randomly-generated Mondrian-style plots

Project description

mondrian-maker

Python package that produces randomly-generated Mondrian-style plots.

This python library allows the user to create Mondrian De Stijl-style images via numpy and matplotlib. Piet Mondrian was one of the most influential artists of the 20th century. The package mondrian-maker seeks to recreate his style via randomly-generated (or user-defined) sets of numbers.

Output Samples

The samples below show a sample Mondrian painting as well as an example of the output of the mondrian module. The output is generally formatted as a pdf file, which can be converted into other extensions.

Composition with Red, Blue, and Yellow, Piet Mondrian, 1930

mondrian.py-generated plot

Installation

Dependencies for this project are listed in requirements.txt. This library is compatible with python3 >= 3.7.6 and requires both git and pip to be installed locally. This repository can be installed via the following steps:

git clone https://github.com/andrewbowen19/mondrian-maker.git

From the command-line:

cd mondrian-maker

Then, you can install via pip.

pip install .

Alternative Installation as of v0.0.2

This package is also installable via pip and PyPi. The project page can be found for distribution here. You can also install the library via the following command:

pip install mondrian-maker

Usage

If pip installed locally, the mondrian class can be imported into a python script as shown below:

from mondrian_maker.mondrian import mondrian

m = mondrian()
m.make_mondrian(<args>)

The mondrian class in the mondrian_maker.mondrian module contained the method make_mondrian which actually creates the plot. In addition, the mondrian.py module can be run directly with python command-line args

python mondrian.py --n_plots <int> --savefig <boolean> --array_size <int> --title <str>

TODO

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

mondrian_maker-0.0.2-py3-none-any.whl (12.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page