@@ -12,6 +12,9 @@ svn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk matplotli
12
12
# checking out the main src
13
13
svn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/matplotlib matplotlib --username=youruser --password=yourpass
14
14
15
+ # branch checkouts, eg the transforms branch
16
+ svn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/transforms transbranch
17
+
15
18
== Committing changes ==
16
19
17
20
When committing changes to matplotlib, there are a few things to bear
@@ -27,12 +30,6 @@ in mind.
27
30
support 2.3, so avoid 2.4 only features like decorators until we
28
31
remove 2.3 support
29
32
30
- * Are your changes Numeric, numarray and numpy compatible? Try
31
- running simple_plot.py or image_demo.py with --Numeric, --numarray
32
- and --numpy (Note, someone should add examples to
33
- backend_driver.py which explicitly require numpy, numarray and
34
- Numeric so we can automatically catch these)
35
-
36
33
* Can you pass examples/backend_driver.py? This is our poor man's
37
34
unit test.
38
35
@@ -49,9 +46,8 @@ in mind.
49
46
For numpy, use:
50
47
51
48
import numpy as npy
52
- ...
53
49
a = npy.array([1,2,3])
54
- ...
50
+
55
51
56
52
For masked arrays, use:
57
53
import matplotlib.numerix.npyma as ma
@@ -64,15 +60,19 @@ For masked arrays, use:
64
60
For matplotlib main module, use:
65
61
66
62
import matplotlib as mpl
67
- ...
68
63
mpl.rcParams['xtick.major.pad'] = 6
69
64
70
- For matplotlib modules, use:
65
+ For matplotlib modules (or any other modules), use:
66
+
67
+ import matplotlib.cbook as cbook
68
+
69
+ if cbook.iterable(z):
70
+ pass
71
71
72
- import matplotlib.cbook as cbook as mpl_cbook
73
- ...
74
- if mpl_cbook.iterable(z):
75
- .. .
72
+ We prefer this over the equivalent 'from matplotlib import cbook'
73
+ because the latter is ambiguous whether cbook is a module or a
74
+ function to the new developer. The former makes it explcit that
75
+ you are importing a module or package .
76
76
77
77
== Naming, spacing, and formatting conventions ==
78
78
@@ -114,15 +114,6 @@ noise in svn diffs. If you are an emacs user, the following in your
114
114
python, C and C++
115
115
116
116
117
- When importing modules from the matplotlib namespace
118
-
119
- import matplotlib.cbook as cbook # DO
120
- from matplotlib import cbook #DONT
121
-
122
- because the latter is ambiguous whether cbook is a module or a
123
- function to the new developer. The former makes it explcit that you
124
- are importing a module or package.
125
-
126
117
; and similarly for c++-mode-hook and c-mode-hook
127
118
(add-hook 'python-mode-hook
128
119
(lambda ()
0 commit comments