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 details)

Uploaded Python 3

File details

Details for the file mondrian_maker-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: mondrian_maker-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 12.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.6

File hashes

Hashes for mondrian_maker-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bf85dd91a62e04cea3a04b87de02504d9d6ab0b62444d0a4c31e5de845f7c3a1
MD5 b475fb0bbe938d12c657643c5a09d479
BLAKE2b-256 b2c9f581cdd42cc2badbd4f207c831d611daf0b5631e732391fa0d330221696d

See more details on using hashes here.

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