Skip to content

Commit 7cb6066

Browse files
committed
cleaning up code. Added tests and test images
1 parent bd55ab2 commit 7cb6066

File tree

10 files changed

+1092
-5
lines changed

10 files changed

+1092
-5
lines changed

doc/devel/coding_guide.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,16 @@ Writing a new pyplot function
277277
-----------------------------
278278

279279
A large portion of the pyplot interface is automatically generated by the
280-
`boilerplate.py` script (in the root of the source tree). To add or remove
280+
`boilerplate.py` script (in the root of the source tree). To add or remove
281281
a plotting method from pyplot, edit the appropriate list in `boilerplate.py`
282282
and then run the script which will update the content in
283283
`lib/matplotlib/pyplot.py`. Both the changes in `boilerplate.py` and
284284
`lib/matplotlib/pyplot.py` should be checked into the repository.
285+
286+
Note: boilerplate.py looks for changes in the installed version of matplotlib
287+
and not the source tree. If you expect the pyplot.py file to show your new
288+
changes, but they are missing, this might be the cause.
289+
290+
Install your new files by running `python setup.py build` and `python setup.py
291+
install` followed by `python boilerplate.py`. The new pyplot.py file should now
292+
have the latest changes.

lib/matplotlib/axes/_axes.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2457,8 +2457,10 @@ def pie(self, x, explode=None, labels=None, colors=None,
24572457
else:
24582458
theta1 = startangle / 360.0
24592459

2460-
wedgeprops = {} if (wedgeprops is None) else wedgeprops
2461-
textprops = {} if (textprops is None) else textprops
2460+
if wedgeprops is None:
2461+
wedgeprops = {}
2462+
if textprops is None:
2463+
textprops = {}
24622464

24632465
texts = []
24642466
slices = []

lib/matplotlib/pyplot.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3046,7 +3046,8 @@ def phase_spectrum(x, Fs=None, Fc=None, window=None, pad_to=None, sides=None,
30463046
@_autogen_docstring(Axes.pie)
30473047
def pie(x, explode=None, labels=None, colors=None, autopct=None,
30483048
pctdistance=0.6, shadow=False, labeldistance=1.1, startangle=None,
3049-
radius=None, counterclock=True, linewidth=None, hold=None):
3049+
radius=None, counterclock=True, wedgeprops=None, textprops=None,
3050+
hold=None):
30503051
ax = gca()
30513052
# allow callers to override the hold state by passing hold=True|False
30523053
washold = ax.ishold()
@@ -3058,7 +3059,7 @@ def pie(x, explode=None, labels=None, colors=None, autopct=None,
30583059
autopct=autopct, pctdistance=pctdistance, shadow=shadow,
30593060
labeldistance=labeldistance, startangle=startangle,
30603061
radius=radius, counterclock=counterclock,
3061-
linewidth=linewidth)
3062+
wedgeprops=wedgeprops, textprops=textprops)
30623063
draw_if_interactive()
30633064
finally:
30643065
ax.hold(washold)
Binary file not shown.
39.4 KB
Loading

0 commit comments

Comments
 (0)