Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2da8562

Browse files
committed
Address review comments
1 parent de37bc5 commit 2da8562

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

lib/matplotlib/hatch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def __init__(self, hatch, density):
170170
path = Path.unit_regular_star(5)
171171
self.shape_vertices = path.vertices
172172
self.shape_codes = np.full(len(self.shape_vertices), Path.LINETO,
173-
dtype='float64')
173+
dtype='int32')
174174
self.shape_codes[0] = Path.MOVETO
175175
Shapes.__init__(self, hatch, density)
176176

lib/matplotlib/legend_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def create_artists(self, legend, orig_handle,
231231
xdata, xdata_marker = self.get_xdata(legend, xdescent, ydescent,
232232
width, height, fontsize)
233233

234-
ydata = np.full(xdata.shape, ((height - ydescent) / 2.), float)
234+
ydata = np.full(xdata.shape, ((height - ydescent) / 2), float)
235235
legline = Line2D(xdata, ydata)
236236

237237
self.update_prop(legline, orig_handle, legend)

lib/matplotlib/path.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ def make_compound_path_from_polys(cls, XY):
312312
stride = numsides + 1
313313
nverts = numpolys * stride
314314
verts = np.zeros((nverts, 2))
315-
codes = np.full(nverts, cls.LINETO, dtype=int)
315+
codes = np.full(nverts, cls.LINETO, dtype=cls.code_type)
316316
codes[0::stride] = cls.MOVETO
317317
codes[numsides::stride] = cls.CLOSEPOLY
318318
for i in range(numsides):
@@ -553,7 +553,7 @@ def interpolated(self, steps):
553553
codes = self.codes
554554
if codes is not None:
555555
new_codes = np.full(((len(codes) - 1) * steps + 1, ), Path.LINETO,
556-
dtype='float64')
556+
dtype=self.code_type)
557557
new_codes[0::steps] = codes
558558
else:
559559
new_codes = None
@@ -803,7 +803,7 @@ def unit_circle_righthalf(cls):
803803

804804
float)
805805

806-
codes = np.full(14, cls.CURVE4, dtype='float64')
806+
codes = np.full(14, cls.CURVE4, dtype=cls.code_type)
807807
codes[0] = cls.MOVETO
808808
codes[-1] = cls.CLOSEPOLY
809809

0 commit comments

Comments
 (0)