Skip to content

Collection of simple-to-use methods to make visualization more convenient

License

Notifications You must be signed in to change notification settings

mohammadbashiri/lipstick

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lipstick 💄

Lipstick is a simple, lightweight set of tools for creating beautiful visualizations. Just apply some lipstick to your data and you're ready to go!

Installation

Install the latest version of Lipstick with pip:

pip install lipstick

or install the latest development version from GitHub:

pip install git+git://github.com/mohammadbashiri/lipstick.git

Example usage

Creating a gif

Creating animated gifs is easy with Lipstick.

``` python
import numpy as np
import matplotlib.pyplot as plt
from lipstick import GifMaker

with GifMaker("sample.gif") as g:
    
    for i in range(30): # go through the frames

        # create a figure
        fig, ax = plt.subplots(figsize=(2, 2), dpi=150)
        ax.imshow(np.random.rand(3, 3))
        ax.text(2, 2, i, ha='center', va='center')
        ax.set(xticks=[], yticks=[])
        
        # add the figure object to the GifMaker
        g.add(fig)
        
g.show()

Updating the displayed figure in a loop

You have a loop and you want to update the same figure (with new results) as you go through the loop? You can also use the update_fig method:

🐛 Report bugs (or request features)

If you find a bug or would like to see new features, please create an issue or make a PR 🌟

About

Collection of simple-to-use methods to make visualization more convenient

Resources

License

Stars

Watchers

Forks

Languages