skywalker
skywalker

Reputation: 26

Using Seaborn to plot time series dataframe

I am trying to plot a pandas data frame that looks like below using Seaborn:

Date       | Size       | Volatility |Liquidity |Value     |Growth    |Medium-Term Momentum  Leverage  |Exchange Rate Sensitivity  
2015-12-01 |0.544913    |0.148974    |0.054775  |0.022000  |0.017445  |0.016755 -0.036878              |0.022004    
2015-12-02 |-0.205794   |-0.269582   |-0.000488 |-0.061183 |0.015816  |0.067442 -0.034935              |0.051987 
2015-12-03 |-0.487403   |-0.284386   |0.003767  |0.031578  |-0.022917 |0.045993 0.019988               |-0.034294

What I am trying to achieve is something like this:

Plot I want

How do I use Seaborn data library for this?

I have already checked the questions on stackoverflow regarding this, one suggestion was to use matplotlib, but I am looking to purely use seaborn to accomplish the task.

Upvotes: 0

Views: 531

Answers (1)

Nils Gudat
Nils Gudat

Reputation: 13800

As you can see on the Seaborn installation page, matplotlib is a mandatory dependency of seaborn.

In fact, seaborn (at the most basic level) merely changes the default style of matplotlib plots, so won't work without it. You might achieve what you're looking to do by simply doing:

import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns

df.Size.plot

Which uses pandas plotting functionality with seaborn default style.

Upvotes: 1

Related Questions