[programming] removed density=False argument from logical_operators.py
This commit is contained in:
parent
0d1f201bd8
commit
196d14d892
@ -7,7 +7,7 @@ x = np.random.randn(1000000)
|
|||||||
|
|
||||||
fig = plt.figure()
|
fig = plt.figure()
|
||||||
ax1 = plt.subplot2grid((2,2), (0, 0))
|
ax1 = plt.subplot2grid((2,2), (0, 0))
|
||||||
ax1.hist(x, bins=np.arange(-4,4.1, 0.1), density=False, fc='dodgerblue', lw=None, ec=None )
|
ax1.hist(x, bins=np.arange(-4,4.1, 0.1), fc='dodgerblue', lw=None, ec=None )
|
||||||
ax1.set_xlim(-3, 3)
|
ax1.set_xlim(-3, 3)
|
||||||
#ax1.set_xlabel("x", fontsize=9)
|
#ax1.set_xlabel("x", fontsize=9)
|
||||||
ax1.set_ylabel("#", fontsize=9)
|
ax1.set_ylabel("#", fontsize=9)
|
||||||
@ -20,8 +20,8 @@ ax1.set_xticklabels([])
|
|||||||
ax1.text(-5.5, 1.025*ax1.get_ylim()[1], "A", fontsize=12)
|
ax1.text(-5.5, 1.025*ax1.get_ylim()[1], "A", fontsize=12)
|
||||||
|
|
||||||
ax2 = plt.subplot2grid((2,2), (0, 1))
|
ax2 = plt.subplot2grid((2,2), (0, 1))
|
||||||
ax2.hist(x[x < 0.0], bins=np.arange(-4,4.1, 0.1), density=False, fc='red', lw=None, ec=None)
|
ax2.hist(x[x < 0.0], bins=np.arange(-4,4.1, 0.1), fc='red', lw=None, ec=None)
|
||||||
ax2.hist(x[x > 0.0], bins=np.arange(-4,4.1, 0.1), density=False, fc='orange', lw=None, ec=None)
|
ax2.hist(x[x > 0.0], bins=np.arange(-4,4.1, 0.1), fc='orange', lw=None, ec=None)
|
||||||
ax2.set_xlim(-3, 3)
|
ax2.set_xlim(-3, 3)
|
||||||
#ax2.set_xlabel("x", fontsize=9)
|
#ax2.set_xlabel("x", fontsize=9)
|
||||||
ax2.set_ylabel("#", fontsize=9)
|
ax2.set_ylabel("#", fontsize=9)
|
||||||
@ -35,8 +35,8 @@ ax2.set_xticklabels([])
|
|||||||
ax2.text(-5.5, 1.025*ax2.get_ylim()[1], "B", fontsize=12)
|
ax2.text(-5.5, 1.025*ax2.get_ylim()[1], "B", fontsize=12)
|
||||||
|
|
||||||
ax3 = plt.subplot2grid((2,2), (1, 0))
|
ax3 = plt.subplot2grid((2,2), (1, 0))
|
||||||
ax3.hist(x[(x > -0.5) & (x < 0.5)], bins=np.arange(-4,4.1, 0.1), density=False, fc='red', lw=None, ec=None)
|
ax3.hist(x[(x > -0.5) & (x < 0.5)], bins=np.arange(-4,4.1, 0.1), fc='red', lw=None, ec=None)
|
||||||
ax3.hist(x[(x < -0.5) | (x > 0.5)], bins=np.arange(-4,4.1, 0.1), density=False, fc='dodgerblue', lw=None, ec=None)
|
ax3.hist(x[(x < -0.5) | (x > 0.5)], bins=np.arange(-4,4.1, 0.1), fc='dodgerblue', lw=None, ec=None)
|
||||||
ax3.set_xlim(-3, 3)
|
ax3.set_xlim(-3, 3)
|
||||||
ax3.set_xlabel("x", fontsize=9)
|
ax3.set_xlabel("x", fontsize=9)
|
||||||
ax3.set_ylabel("#", fontsize=9)
|
ax3.set_ylabel("#", fontsize=9)
|
||||||
@ -48,9 +48,9 @@ ax3.set_yticklabels([])
|
|||||||
ax3.text(-5.5, 1.025*ax3.get_ylim()[1], "C", fontsize=12)
|
ax3.text(-5.5, 1.025*ax3.get_ylim()[1], "C", fontsize=12)
|
||||||
|
|
||||||
ax4 = plt.subplot2grid((2,2), (1, 1))
|
ax4 = plt.subplot2grid((2,2), (1, 1))
|
||||||
ax4.hist(x[(x >= -1.2) & (x <= 1.2)], bins=np.arange(-4,4.1, 0.1), density=False, fc='dodgerblue',
|
ax4.hist(x[(x >= -1.2) & (x <= 1.2)], bins=np.arange(-4,4.1, 0.1), fc='dodgerblue',
|
||||||
lw=None, ec=None)
|
lw=None, ec=None)
|
||||||
ax4.hist(x[(x < -1.2) | (x > 1.2)], bins=np.arange(-4,4.1, 0.1), density=False, fc='red',
|
ax4.hist(x[(x < -1.2) | (x > 1.2)], bins=np.arange(-4,4.1, 0.1), fc='red',
|
||||||
lw=None, ec=None)
|
lw=None, ec=None)
|
||||||
ax4.set_xlim(-3, 3)
|
ax4.set_xlim(-3, 3)
|
||||||
ax4.set_xlabel("x", fontsize=9)
|
ax4.set_xlabel("x", fontsize=9)
|
||||||
|
Reference in New Issue
Block a user