Search code examples
pythonpandastime-seriesseabornvincent

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?


Solution

  • 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.