python 2.7 - Plot multiple lines on subplots with pandas df.plot -


is there way plot multiple dataframe columns on 1 plot, several subplots dataframe?

e.g. if df has 12 data columns, on subplot 1, plot columns 1-3, subplot 2, columns 4-6, etc.

i understand how use df.plot have 1 subplot each column, not sure how group specified above.

thanks!

this example of how it:

import pandas pd import numpy np import matplotlib.pyplot plt  fig, axes = plt.subplots(1, 2)  np.random.seed([3,1415]) df = pd.dataframe(np.random.randn(100, 6), columns=list('abcdef')) df = df.div(100).add(1.01).cumprod()  df.iloc[:, :3].plot(ax=axes[0]) df.iloc[:, 3:].plot(ax=axes[1]) 

enter image description here


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -