File tree 3 files changed +12
-2
lines changed 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 2
2
# Demo of using multiprocessing for generating data in one process and plotting
3
3
# in another.
4
4
# Written by Robert Cimrman
5
+ from six .moves import input
5
6
6
7
from __future__ import print_function
7
8
import time
@@ -82,7 +83,7 @@ def main():
82
83
for ii in range (10 ):
83
84
pl .plot ()
84
85
time .sleep (0.5 )
85
- raw_input ('press Enter...' )
86
+ input ('press Enter...' )
86
87
pl .plot (finished = True )
87
88
88
89
if __name__ == '__main__' :
Original file line number Diff line number Diff line change 2
2
from matplotlib .mlab import griddata
3
3
import matplotlib .pyplot as plt
4
4
import numpy as np
5
+ from six .moves import input
6
+
5
7
# make up data.
6
- #npts = int(raw_input ('enter # of random points to plot:'))
8
+ #npts = int(input ('enter # of random points to plot:'))
7
9
seed (0 )
8
10
npts = 200
9
11
x = uniform (- 2 , 2 , npts )
Original file line number Diff line number Diff line change 8
8
from matplotlib .path import Path
9
9
10
10
11
+ try :
12
+ raw_input
13
+ except NameError :
14
+ # Python 3
15
+ raw_input = input
16
+
17
+
11
18
class SelectFromCollection (object ):
12
19
"""Select indices from a matplotlib collection using `LassoSelector`.
13
20
You can’t perform that action at this time.
0 commit comments