Skip to content

mep12 on scatter_profile.py #4734

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 19, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions examples/pylab_examples/scatter_profile.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#!/usr/bin/env python
# -*- noplot -*-

"""
N Classic Base renderer Ext renderer
20 0.22 0.14 0.14
Expand All @@ -9,16 +6,16 @@
10000 3.30 1.31 0.53
50000 19.30 6.53 1.98
"""
from __future__ import print_function
import pylab
from __future__ import print_function # only needed for python 2.x
import matplotlib.pyplot as plt
import numpy as np

import time


for N in (20, 100, 1000, 10000, 50000):
tstart = time.time()
x = 0.9*pylab.rand(N)
y = 0.9*pylab.rand(N)
s = 20*pylab.rand(N)
pylab.scatter(x, y, s)
x = 0.9*np.random.rand(N)
y = 0.9*np.random.rand(N)
s = 20*np.random.rand(N)
plt.scatter(x, y, s)
print('%d symbols in %1.2f s' % (N, time.time() - tstart))