Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to make Seaborn or Vincent interactive?

I've been trying to find a way to make Seaborn and Vincent interactive so that I can, for example, zoom in/out in a specific area of the plot in real time. Is this possible to do? Alternatively, are there other recommended libraries (that are not cloud-based services) that work well for visualizing time series data?

like image 213
cavs Avatar asked Jul 06 '15 13:07

cavs


People also ask

Does Seaborn have interactive plots?

Behind the scenes, seaborn uses matplotlib to draw its plots. For interactive work, it's recommended to use a Jupyter/IPython interface in matplotlib mode, or else you'll have to call matplotlib. pyplot. show() when you want to see the plot.

Does Streamlit work with Seaborn?

Seaborn is an amazing data visualization library for statistical graphics plotting in Python. Seaborn provides beautiful default styles and color palettes to make statistical plots more attractive.


1 Answers

If this is for your own benefit, rather than something you need to show to others, you can use IPython notebooks and the %matplotlib nbagg backend, at least for Seaborn, e.g.:

%matplotlib nbagg
import matplotlib.pyplot as plt
import numpy as np

x = np.linspace(0, 50, 100)
y = x**(0.5)

plt.plot(x, y)

If you don't already have IPython etc. set up, you can quickly test this out by creating a new notebook at try.jupyter.org, pasting the code into a cell, and hitting Shift + Enter to run. Since this is running on a free VM it will be slow, running the notebook locally will mean panning/zooming is much smoother.

like image 146
Marius Avatar answered Oct 22 '22 14:10

Marius