I wrote a small script to plot a data and its pdf in single figure but as two subplots.
However i want to share xaxis of ax2 (subplot 122) with the y axis of ax1 (subplot 121). What function should i use do that. I tried sharex and sharey but i am not gettting what i want.
Is there any possiblity to one of the subplot for instance i want to rotate ax2 by 90.
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.mlab as mlb
n, bins, patches = ax2.hist(data1, bins=25, normed=1, facecolor=‘green’, alpha=0.75,visible=False)
y = mlb.normpdf( bins, mu, sigma)
l = ax2.plot(bins,y,’-’,linewidth=1.2)