How to plot 5 subplots sharing x and y axes in Python -


as in title, have 5 plots in python want produce. how plot 5 of these share same axes? thanks

you can use subplot sharex , sharey options. example:

import numpy np import pylab pl  x = np.linspace(-1, 1, 100) y = np.zeros((5, 100)) in range(5):     y[i] = x**i  ax = []     kw = {} in range(5):     if > 0:         kw ={'sharex': ax[0], 'sharey': ax[0]}     ax.append(pl.subplot(3, 2, i+1, **kw))     ax[i].plot(x, y[i]) 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -