8000 mep12 on hist2d_log_demo.py · matplotlib/matplotlib@5a80f10 · GitHub
[go: up one dir, main page]

Skip to content

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5a80f10

Browse files
committed
mep12 on hist2d_log_demo.py
1 parent 030cd4b commit 5a80f10

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed
Lines changed: 7 additions & 6 deletions
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)
0