Skip to content

Commit 7e1e1e7

Browse files
authored
Merge pull request matplotlib#23555 from anntzer/ot
Uncamelcase offsetTrans in draw_path_collection.
2 parents ae6db3c + c03c672 commit 7e1e1e7

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

lib/matplotlib/backend_bases.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ def draw_markers(self, gc, marker_path, marker_trans, path,
221221
rgbFace)
222222

223223
def draw_path_collection(self, gc, master_transform, paths, all_transforms,
224-
offsets, offsetTrans, facecolors, edgecolors,
224+
offsets, offset_trans, facecolors, edgecolors,
225225
linewidths, linestyles, antialiaseds, urls,
226226
offset_position):
227227
"""
@@ -230,7 +230,7 @@ def draw_path_collection(self, gc, master_transform, paths, all_transforms,
230230
Each path is first transformed by the corresponding entry
231231
in *all_transforms* (a list of (3, 3) matrices) and then by
232232
*master_transform*. They are then translated by the corresponding
233-
entry in *offsets*, which has been first transformed by *offsetTrans*.
233+
entry in *offsets*, which has been first transformed by *offset_trans*.
234234
235235
*facecolors*, *edgecolors*, *linewidths*, *linestyles*, and
236236
*antialiased* are lists that set the corresponding properties.
@@ -251,7 +251,7 @@ def draw_path_collection(self, gc, master_transform, paths, all_transforms,
251251
paths, all_transforms)
252252

253253
for xo, yo, path_id, gc0, rgbFace in self._iter_collection(
254-
gc, list(path_ids), offsets, offsetTrans,
254+
gc, list(path_ids), offsets, offset_trans,
255255
facecolors, edgecolors, linewidths, linestyles,
256256
antialiaseds, urls, offset_position):
257257
path, transform = path_id
@@ -367,7 +367,7 @@ def _iter_collection_uses_per_path(self, paths, all_transforms,
367367
N = max(Npath_ids, len(offsets))
368368
return (N + Npath_ids - 1) // Npath_ids
369369

370-
def _iter_collection(self, gc, path_ids, offsets, offsetTrans, facecolors,
370+
def _iter_collection(self, gc, path_ids, offsets, offset_trans, facecolors,
371371
edgecolors, linewidths, linestyles,
372372
antialiaseds, urls, offset_position):
373373
"""
@@ -413,7 +413,7 @@ def cycle_or_default(seq, default=None):
413413
else itertools.repeat(default))
414414

415415
pathids = cycle_or_default(path_ids)
416-
toffsets = cycle_or_default(offsetTrans.transform(offsets), (0, 0))
416+
toffsets = cycle_or_default(offset_trans.transform(offsets), (0, 0))
417417
fcs = cycle_or_default(facecolors)
418418
ecs = cycle_or_default(edgecolors)
419419
lws = cycle_or_default(linewidths)

lib/matplotlib/backends/backend_pdf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2046,7 +2046,7 @@ def draw_path(self, gc, path, transform, rgbFace=None):
20462046
self.file.output(self.gc.paint())
20472047

20482048
def draw_path_collection(self, gc, master_transform, paths, all_transforms,
2049-
offsets, offsetTrans, facecolors, edgecolors,
2049+
offsets, offset_trans, facecolors, edgecolors,
20502050
linewidths, linestyles, antialiaseds, urls,
20512051
offset_position):
20522052
# We can only reuse the objects if the presence of fill and
@@ -2088,7 +2088,7 @@ def draw_path_collection(self, gc, master_transform, paths, all_transforms,
20882088
if (not can_do_optimization) or (not should_do_optimization):
20892089
return RendererBase.draw_path_collection(
20902090
self, gc, master_transform, paths, all_transforms,
2091-
offsets, offsetTrans, facecolors, edgecolors,
2091+
offsets, offset_trans, facecolors, edgecolors,
20922092
linewidths, linestyles, antialiaseds, urls,
20932093
offset_position)
20942094

@@ -2104,7 +2104,7 @@ def draw_path_collection(self, gc, master_transform, paths, all_transforms,
21042104
output(*self.gc.push())
21052105
lastx, lasty = 0, 0
21062106
for xo, yo, path_id, gc0, rgbFace in self._iter_collection(
2107-
gc, path_codes, offsets, offsetTrans,
2107+
gc, path_codes, offsets, offset_trans,
21082108
facecolors, edgecolors, linewidths, linestyles,
21092109
antialiaseds, urls, offset_position):
21102110

lib/matplotlib/backends/backend_ps.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ def draw_markers(
530530

531531
@_log_if_debug_on
532532
def draw_path_collection(self, gc, master_transform, paths, all_transforms,
533-
offsets, offsetTrans, facecolors, edgecolors,
533+
offsets, offset_trans, facecolors, edgecolors,
534534
linewidths, linestyles, antialiaseds, urls,
535535
offset_position):
536536
# Is the optimization worth it? Rough calculation:
@@ -546,7 +546,7 @@ def draw_path_collection(self, gc, master_transform, paths, all_transforms,
546546
if not should_do_optimization:
547547
return RendererBase.draw_path_collection(
548548
self, gc, master_transform, paths, all_transforms,
549-
offsets, offsetTrans, facecolors, edgecolors,
549+
offsets, offset_trans, facecolors, edgecolors,
550550
linewidths, linestyles, antialiaseds, urls,
551551
offset_position)
552552

@@ -565,7 +565,7 @@ def draw_path_collection(self, gc, master_transform, paths, all_transforms,
565565
path_codes.append(name)
566566

567567
for xo, yo, path_id, gc0, rgbFace in self._iter_collection(
568-
gc, path_codes, offsets, offsetTrans,
568+
gc, path_codes, offsets, offset_trans,
569569
facecolors, edgecolors, linewidths, linestyles,
570570
antialiaseds, urls, offset_position):
571571
ps = "%g %g %s" % (xo, yo, path_id)

lib/matplotlib/backends/backend_svg.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ def draw_markers(
742742
writer.end('g')
743743

744744
def draw_path_collection(self, gc, master_transform, paths, all_transforms,
745-
offsets, offsetTrans, facecolors, edgecolors,
745+
offsets, offset_trans, facecolors, edgecolors,
746746
linewidths, linestyles, antialiaseds, urls,
747747
offset_position):
748748
# Is the optimization worth it? Rough calculation:
@@ -758,7 +758,7 @@ def draw_path_collection(self, gc, master_transform, paths, all_transforms,
758758
if not should_do_optimization:
759759
return super().draw_path_collection(
760760
gc, master_transform, paths, all_transforms,
761-
offsets, offsetTrans, facecolors, edgecolors,
761+
offsets, offset_trans, facecolors, edgecolors,
762762
linewidths, linestyles, antialiaseds, urls,
763763
offset_position)
764764

@@ -776,7 +776,7 @@ def draw_path_collection(self, gc, master_transform, paths, all_transforms,
776776
writer.end('defs')
777777

778778
for xo, yo, path_id, gc0, rgbFace in self._iter_collection(
779-
gc, path_codes, offsets, offsetTrans,
779+
gc, path_codes, offsets, offset_trans,
780780
facecolors, edgecolors, linewidths, linestyles,
781781
antialiaseds, urls, offset_position):
782782
url = gc0.get_url()

lib/matplotlib/backends/backend_template.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def draw_path(self, gc, path, transform, rgbFace=None):
6363
# relative timings by leaving it out. backend implementers concerned with
6464
# performance will probably want to implement it
6565
# def draw_path_collection(self, gc, master_transform, paths,
66-
# all_transforms, offsets, offsetTrans,
66+
# all_transforms, offsets, offset_trans,
6767
# facecolors, edgecolors, linewidths, linestyles,
6868
# antialiaseds):
6969
# pass

0 commit comments

Comments
 (0)