Skip to content

Commit 162c073

Browse files
authored
Merge pull request #21565 from anntzer/op
Further remove remnants of offset_position.
2 parents a3ba7cf + 22b9dc2 commit 162c073

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

lib/matplotlib/collections.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,6 @@ def __init__(self,
180180
self.set_pickradius(pickradius)
181181
self.set_urls(urls)
182182
self.set_hatch(hatch)
183-
self._offset_position = "screen"
184183
self.set_zorder(zorder)
185184

186185
if capstyle:
@@ -417,7 +416,7 @@ def draw(self, renderer):
417416
self.get_facecolor(), self.get_edgecolor(),
418417
self._linewidths, self._linestyles,
419418
self._antialiaseds, self._urls,
420-
self._offset_position)
419+
"screen") # offset_position, kept for backcompat.
421420

422421
gc.restore()
423422
renderer.close_group(self.__class__.__name__)
@@ -470,8 +469,7 @@ def contains(self, mouseevent):
470469
ind = _path.point_in_path_collection(
471470
mouseevent.x, mouseevent.y, pickradius,
472471
transform.frozen(), paths, self.get_transforms(),
473-
offsets, transOffset, pickradius <= 0,
474-
self._offset_position)
472+
offsets, transOffset, pickradius <= 0)
475473

476474
return len(ind) > 0, dict(ind=ind)
477475

src/_path_wrapper.cpp

+3-5
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ static PyObject *Py_get_path_collection_extents(PyObject *self, PyObject *args,
312312
const char *Py_point_in_path_collection__doc__ =
313313
"point_in_path_collection("
314314
"x, y, radius, master_transform, paths, transforms, offsets, "
315-
"offset_trans, filled, offset_position)\n"
315+
"offset_trans, filled)\n"
316316
"--\n\n";
317317

318318
static PyObject *Py_point_in_path_collection(PyObject *self, PyObject *args, PyObject *kwds)
@@ -324,11 +324,10 @@ static PyObject *Py_point_in_path_collection(PyObject *self, PyObject *args, PyO
324324
numpy::array_view<const double, 2> offsets;
325325
agg::trans_affine offset_trans;
326326
bool filled;
327-
PyObject *offset_position; // no longer used
328327
std::vector<int> result;
329328

330329
if (!PyArg_ParseTuple(args,
331-
"dddO&O&O&O&O&O&O:point_in_path_collection",
330+
"dddO&O&O&O&O&O&:point_in_path_collection",
332331
&x,
333332
&y,
334333
&radius,
@@ -343,8 +342,7 @@ static PyObject *Py_point_in_path_collection(PyObject *self, PyObject *args, PyO
343342
&convert_trans_affine,
344343
&offset_trans,
345344
&convert_bool,
346-
&filled,
347-
&offset_position)) {
345+
&filled)) {
348346
return NULL;
349347
}
350348

0 commit comments

Comments
 (0)