Skip to content

Commit 1d28727

Browse files
committed
Address review comments
1 parent c02bf7c commit 1d28727

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
@@ -316,7 +316,7 @@ def make_compound_path_from_polys(cls, XY):
316316
stride = numsides + 1
317317
nverts = numpolys * stride
318318
verts = np.zeros((nverts, 2))
319-
codes = np.full(nverts, cls.LINETO, dtype=int)
319+
codes = np.full(nverts, cls.LINETO, dtype=cls.code_type)
320320
codes[0::stride] = cls.MOVETO
321321
codes[numsides::stride] = cls.CLOSEPOLY
322322
for i in range(numsides):
@@ -567,7 +567,7 @@ def interpolated(self, steps):
567567
codes = self.codes
568568
if codes is not None:
569569
new_codes = np.full(((len(codes) - 1) * steps + 1, ), Path.LINETO,
570-
dtype='float64')
570+
dtype=self.code_type)
571571
new_codes[0::steps] = codes
572572
else:
573573
new_codes = None
@@ -826,7 +826,7 @@ def unit_circle_righthalf(cls):
826826

827827
float)
828828

829-
codes = np.full(14, cls.CURVE4, dtype='float64')
829+
codes = np.full(14, cls.CURVE4, dtype=cls.code_type)
830830
codes[0] = cls.MOVETO
831831
codes[-1] = cls.CLOSEPOLY
832832

0 commit comments

Comments
 (0)