Skip to main content

matplotlib extension for vaporwave aesthetics

Project description

# vapeplot

---

matplotlib extension for vaporwave aesthetics

---

## install

```
pip install vapeplot
```

---

## demo

#### view all palettes

```
import vapeplot
%matplotlib inline

vapeplot.available()
```

![alt text](https://raw.githubusercontent.com/dantaki/vapeplot/master/examples/vapeplot.png "vapeplot palettes")

try `from vapeplot import vapeplot` if the above commands failed

#### view specific palettes

```
vapeplot.view_palette("cool",'sunset')
```

![alt text](https://raw.githubusercontent.com/dantaki/vapeplot/master/examples/view_palette.png "cool sunset")

#### set the color palette

```
import numpy as np
import matplotlib.pyplot as plt

vapeplot.set_palette('vaporwave')
for i in range(10):
plt.plot(range(100),np.random.normal(i,1,100))
vapeplot.despine(plt.axes()) # remove right and top axes
```

![alt text](https://raw.githubusercontent.com/dantaki/vapeplot/master/examples/vaporwave.png "vaporwave palette")

#### make a colormap

```
cmap = vapeplot.cmap('crystal_pepsi')
A = np.random.rand(25, 25)
plt.imshow(A,cmap=cmap)
vapeplot.despine(plt.axes(),True) # remove all axes
plt.show()
```

![alt text](https://raw.githubusercontent.com/dantaki/vapeplot/master/examples/vapeplot_colormaps.png "crystal_pepsi colormap")


#### access a palette

```
# cool is a list of colors
cool = vapeplot.palette("cool")

# reverse the order of colors
seapunk_r = vapeplot.reverse("seapunk")

```

---

## examples

plots produced with [seaborn tutorials](https://seaborn.pydata.org/examples/index.html)

set the palette with vapeplot

```
pal = sns.blend_palette(vapeplot.palette(palname))

g = sns.FacetGrid(df, row="g",hue="g", palette=pal)
```

### cool

![alt_text](https://raw.githubusercontent.com/dantaki/vapeplot/master/examples/cool_seaborn_facetgrid.png "cool facetgrid")

![alt_text](https://raw.githubusercontent.com/dantaki/vapeplot/master/examples/cool_seaborn_kdeplot.png "cool kdeplot")


### crystal_pepsi

![alt_text](https://raw.githubusercontent.com/dantaki/vapeplot/master/examples/crystal_pepsi_seaborn_facetgrid.png "crystal_pepsi facetgrid")

![alt_text](https://raw.githubusercontent.com/dantaki/vapeplot/master/examples/crystal_pepsi_seaborn_kdeplot.png "crystal_pepsi kdeplot")

### jazzcup

![alt_text](https://raw.githubusercontent.com/dantaki/vapeplot/master/examples/jazzcup_seaborn_facetgrid.png "jazzcup facetgrid")

![alt_text](https://raw.githubusercontent.com/dantaki/vapeplot/master/examples/jazzcup_seaborn_kdeplot.png "jazzcup kdeplot")

### macplus

![alt_text](https://raw.githubusercontent.com/dantaki/vapeplot/master/examples/macplus_seaborn_facetgrid.png "macplus facetgrid")

![alt_text](https://raw.githubusercontent.com/dantaki/vapeplot/master/examples/macplus_seaborn_kdeplot.png "macplus kdeplot")

### mallsoft

![alt_text](https://raw.githubusercontent.com/dantaki/vapeplot/master/examples/mallsoft_seaborn_facetgrid.png "mallsoft facetgrid")

![alt_text](https://raw.githubusercontent.com/dantaki/vapeplot/master/examples/mallsoft_seaborn_kdeplot.png "mallsoft kdeplot")

### seapunk

![alt_text](https://raw.githubusercontent.com/dantaki/vapeplot/master/examples/seapunk_seaborn_facetgrid.png "seapunk facetgrid")

![alt_text](https://raw.githubusercontent.com/dantaki/vapeplot/master/examples/seapunk_seaborn_kdeplot.png "seapunk kdeplot")

### sunset

![alt_text](https://raw.githubusercontent.com/dantaki/vapeplot/master/examples/sunset_seaborn_facetgrid.png "sunset facetgrid")

![alt_text](https://raw.githubusercontent.com/dantaki/vapeplot/master/examples/sunset_seaborn_kdeplot.png "sunset kdeplot")

### vaporwave

![alt_text](https://raw.githubusercontent.com/dantaki/vapeplot/master/examples/vaporwave_seaborn_facetgrid.png "vaporwave facetgrid")

![alt_text](https://raw.githubusercontent.com/dantaki/vapeplot/master/examples/vaporwave_seaborn_kdeplot.png "vaporwave kdeplot")

Contributer palettes, submit your pull request!

### avanti [by mike-u](https://github.com/mike-u)

![alt_text](https://raw.githubusercontent.com/dantaki/vapeplot/master/examples/avanti_seaborn_facetgrid.png "avanti facetgrid")

![alt_text](https://raw.githubusercontent.com/dantaki/vapeplot/master/examples/avanti_seaborn_kdeplot.png "avanti kdeplot")


---

## api

* `vapeplot.available(show=True)`
* function to plot all vapeplot palettes
* `show=False` prints palette names


* `vapeplot.cmap(palname)`
* returns a colormap object
* `palname` is the name of the color palette


* `vapeplot.despine(ax,all=False)`
* removes figure axes
* default action: remove right and top axes
* `all=True` removes all axes


* `vapeplot.font_size(s)`
* change the font size globally


* `vapeplot.palette(palname)`
* returns a list of colors
* if no `palname` is given, a dict of all the palettes is returned


* `vapeplot.reverse(palname)`
* returns a list of colors in reverse



* `vapeplot.set_palette(palname)`
* change the color palette globally



* `vapeplot.view_palette(*args)`
* view individual palettes
* arguments: one or more palette names

---


## more to come :wink:

Project details


Download files

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

Source Distribution

vapeplot-0.0.8.tar.gz (12.7 kB view details)

Uploaded Source

File details

Details for the file vapeplot-0.0.8.tar.gz.

File metadata

  • Download URL: vapeplot-0.0.8.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.10.0 pkginfo/1.4.1 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.15.0 CPython/2.7.15

File hashes

Hashes for vapeplot-0.0.8.tar.gz
Algorithm Hash digest
SHA256 50cda617664f69873e459d82eeef72a43f7511a6397bc1b6411199645239a4f2
MD5 9d34eb2574852731234c89e8de4f04b1
BLAKE2b-256 c200e23e04f686d950f55bbda9502d54e437a3b0cbc7c74f6bcaaae0765bc1cf

See more details on using hashes here.

Supported by

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