From 5a80f10b4e42373a34030d4f2c3cd46c75ac21cb Mon Sep 17 00:00:00 2001 From: Eric Ma Date: Sun, 23 Aug 2015 21:10:07 -0400 Subject: [PATCH] mep12 on hist2d_log_demo.py --- examples/pylab_examples/hist2d_log_demo.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/examples/pylab_examples/hist2d_log_demo.py b/examples/pylab_examples/hist2d_log_demo.py index dada02280ab1..48936b8bdb0b 100644 --- a/examples/pylab_examples/hist2d_log_demo.py +++ b/examples/pylab_examples/hist2d_log_demo.py @@ -1,10 +1,11 @@ from matplotlib.colors import LogNorm -from pylab import * +import matplotlib.pyplot as plt +import numpy as np # normal distribution center at x=0 and y=5 -x = randn(100000) -y = randn(100000) + 5 +x = np.random.randn(100000) +y = np.random.randn(100000) + 5 -hist2d(x, y, bins=40, norm=LogNorm()) -colorbar() -show() +plt.hist2d(x, y, bins=40, norm=LogNorm()) +plt.colorbar() +plt.show()