Skip to content

Commit 1a78c32

Browse files
committed
Merge pull request matplotlib#4982 from ericmjl/mep12-hist2d_log_demo.py
Mep12 hist2d log demo.py
2 parents 200dffb + 5a80f10 commit 1a78c32

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed
+7-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
from matplotlib.colors import LogNorm
2-
from pylab import *
2+
import matplotlib.pyplot as plt
3+
import numpy as np
34

45
# normal distribution center at x=0 and y=5
5-
x = randn(100000)
6-
y = randn(100000) + 5
6+
x = np.random.randn(100000)
7+
y = np.random.randn(100000) + 5
78

8-
hist2d(x, y, bins=40, norm=LogNorm())
9-
colorbar()
10-
show()
9+
plt.hist2d(x, y, bins=40, norm=LogNorm())
10+
plt.colorbar()
11+
plt.show()

0 commit comments

Comments
 (0)