From 196d14d892f86da295d3b99548feea9aec8e2344 Mon Sep 17 00:00:00 2001 From: Jan Benda Date: Mon, 25 Nov 2019 21:56:05 +0100 Subject: [PATCH] [programming] removed density=False argument from logical_operators.py --- programming/lecture/logical_operators.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/programming/lecture/logical_operators.py b/programming/lecture/logical_operators.py index df4c0c6..9841fc3 100644 --- a/programming/lecture/logical_operators.py +++ b/programming/lecture/logical_operators.py @@ -7,7 +7,7 @@ x = np.random.randn(1000000) fig = plt.figure() 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_xlabel("x", 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) 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), density=False, fc='orange', 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), fc='orange', lw=None, ec=None) ax2.set_xlim(-3, 3) #ax2.set_xlabel("x", 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) 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), 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='red', 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_xlabel("x", 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) 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) -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) ax4.set_xlim(-3, 3) ax4.set_xlabel("x", fontsize=9)