Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

# python_plot_wrappers A wrapper for making polished multi-line plots with matplotlib. I wrote this as an easy-to-access interface to make cleaner looking plot code, and not have to retype pyplot syntax over and over. Allows for passing data in as nested dictionaries. All lines are created using a single x-axis data set - essentially a setup to visualize parametric sweeps. See sample images by following links below:

https://cloud.githubusercontent.com/assets/15716194/11058820/7b1098be-8763-11e5-91d6-53bd5d71437a.png

https://cloud.githubusercontent.com/assets/15716194/11058821/7b109788-8763-11e5-9c2c-ceb7db39b980.png

Pre-requisites: python + matplotlib, numpy, scipy, latex + texlive-fonts-extra, (and maybe texlive-full)

Usage: plot_wrapper(plot_data, keys, labels, save_folder)

Instructions:

plot_data : Dictionary (level 1) that contains multiple (level 2) dictionaries. Each level 2 dictionary corresponds to a line in the figure(s), and must have the following key/value pairs:

data[‘x’] = x # list of x-axis values to be plotted

data[‘xlbl’] = ‘X axis label’ # string defining x-axis label

data[‘lstyle’] = ‘-’ # line style. can be ‘–’, ‘-’, ‘-.’ or ‘:’

data[‘mtype’] = ‘s’ # Marker type for line. Recommend ‘s’,’o’,’^’ or ‘’ f

data[‘keyname’]= y # data to be plotted on the y axis

data[‘lcolor’] = ‘r’ # line color. example ‘r’, ‘b’, ‘k’, ‘m’

keys : list of data keys in the level-2 dictionaries that need to be plotted. If multiple level-2 dictionaries havedata under the same key name, these data sets are plotted on the same figure.

labels : y-axis labels (list of strings) that are applied to the y-axis label for each figure, corresponding to entries in the list “keys”. If keys and labels are of different lengths, the shorter list is used to generate figures since I used the zip function.

save_folder : path where you want to save all images. Right now uses png format.

Feel free to modify/add and redistribute under GNU GPL 3.0

Release files for pyplotwrap 0.28beta

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyplotwrap 0.28beta
File Size Uploaded
pyplotwrap-0.28beta.tar.gz 28.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyplotwrap 0.28beta
File Interpreter ABI Platform
pyplotwrap-0.28beta.linux-x86_64.exe Details

Total release size: 111.2 kB

Release files / pyplotwrap-0.28beta.tar.gz

Download URL pyplotwrap-0.28beta.tar.gz
Size 28.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b7ffd8b25e1e3a8aaae76b3375354ddaf1daff16602c7408bcd8d2624c66f7da
BLAKE2b-256 checksum
How to use checksums
e4c99cd03d0d250b0a89dcf7c2c1a0e7e91dad29f8946ebeb50ee804e4c65a7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pyplotwrap-0.28beta.linux-x86_64.exe

Download URL pyplotwrap-0.28beta.linux-x86_64.exe
Size 82.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e2509d19b9b65e04c9757af364118ddbf82c33597cc5c57a64dfcb108192aaa6
BLAKE2b-256 checksum
How to use checksums
ec1f67f3c24576f929cce21a29f609aa536485ec477f89f73f21150302be91ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page