Giter Site home page Giter Site logo

matplotlib_viewer's Introduction

matplotlib_viewer

View matplotlib pickle files

Usage:

Save a matplotlib figure with something like this:

with open(filename_base+'.mplf', 'wb') as outfile:
    pickle.dump(figure, outfile)

Put matplotlib_viewer.py somewhere in your path and configure your system to open .mplf-files with it. Clicking on a mplf file should load and display it

You can use the left and right arrow keys to navigate between figures in the directory the original figure was in. This probably only works with QT backend...

fontsize

Pressing + and - will scale the fontsize. The funny ways it will mess up your figure are considered a feature.

colors

only works on images for now.

  • presing 1-5 will give you boring built-in colormaps
  • pressing 6 will give you a random one
  • pressing x (for 'Xtreme') will spice up the current colormap by doubling it; [1]
  • pressing v (for 'bvring) will despice the current colormap by halving it;
  • pressing c (for 'order') will extent the colormap with a random one
  • pressing r (for 'predictable') will shuffle the colormap

[1] Holding down this key is a fun way to learn about exponential growth and a nice workout for your system actually the new behaviour of re-interpolating the colormap just creates some weird temporal Moiré pattern

supported formats

plain, gzip, bz2, lzma : always

zstandard: install zstandard

in all cases: save figure like

compression_lib.open(filename_base+'.mplf', 'wb') as f:
    pickle.dump(plt.gcf(), f)

matplotlib_viewer's People

Contributors

krachyon avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.