Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Uncamelcase offsetTrans in draw_path_collection. #23555

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions 10 lib/matplotlib/backend_bases.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def draw_markers(self, gc, marker_path, marker_trans, path,
rgbFace)

def draw_path_collection(self, gc, master_transform, paths, all_transforms,
offsets, offsetTrans, facecolors, edgecolors,
offsets, offset_trans, facecolors, edgecolors,
linewidths, linestyles, antialiaseds, urls,
offset_position):
"""
Expand All @@ -230,7 +230,7 @@ def draw_path_collection(self, gc, master_transform, paths, all_transforms,
Each path is first transformed by the corresponding entry
in *all_transforms* (a list of (3, 3) matrices) and then by
*master_transform*. They are then translated by the corresponding
entry in *offsets*, which has been first transformed by *offsetTrans*.
entry in *offsets*, which has been first transformed by *offset_trans*.

*facecolors*, *edgecolors*, *linewidths*, *linestyles*, and
*antialiased* are lists that set the corresponding properties.
Expand All @@ -251,7 +251,7 @@ def draw_path_collection(self, gc, master_transform, paths, all_transforms,
paths, all_transforms)

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

def _iter_collection(self, gc, path_ids, offsets, offsetTrans, facecolors,
def _iter_collection(self, gc, path_ids, offsets, offset_trans, facecolors,
edgecolors, linewidths, linestyles,
antialiaseds, urls, offset_position):
"""
Expand Down Expand Up @@ -413,7 +413,7 @@ def cycle_or_default(seq, default=None):
else itertools.repeat(default))

pathids = cycle_or_default(path_ids)
toffsets = cycle_or_default(offsetTrans.transform(offsets), (0, 0))
toffsets = cycle_or_default(offset_trans.transform(offsets), (0, 0))
fcs = cycle_or_default(facecolors)
ecs = cycle_or_default(edgecolors)
lws = cycle_or_default(linewidths)
Expand Down
6 changes: 3 additions & 3 deletions 6 lib/matplotlib/backends/backend_pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2039,7 +2039,7 @@ def draw_path(self, gc, path, transform, rgbFace=None):
self.file.output(self.gc.paint())

def draw_path_collection(self, gc, master_transform, paths, all_transforms,
offsets, offsetTrans, facecolors, edgecolors,
offsets, offset_trans, facecolors, edgecolors,
linewidths, linestyles, antialiaseds, urls,
offset_position):
# We can only reuse the objects if the presence of fill and
Expand Down Expand Up @@ -2081,7 +2081,7 @@ def draw_path_collection(self, gc, master_transform, paths, all_transforms,
if (not can_do_optimization) or (not should_do_optimization):
return RendererBase.draw_path_collection(
self, gc, master_transform, paths, all_transforms,
offsets, offsetTrans, facecolors, edgecolors,
offsets, offset_trans, facecolors, edgecolors,
linewidths, linestyles, antialiaseds, urls,
offset_position)

Expand All @@ -2097,7 +2097,7 @@ def draw_path_collection(self, gc, master_transform, paths, all_transforms,
output(*self.gc.push())
lastx, lasty = 0, 0
for xo, yo, path_id, gc0, rgbFace in self._iter_collection(
gc, path_codes, offsets, offsetTrans,
gc, path_codes, offsets, offset_trans,
facecolors, edgecolors, linewidths, linestyles,
antialiaseds, urls, offset_position):

Expand Down
6 changes: 3 additions & 3 deletions 6 lib/matplotlib/backends/backend_ps.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ def draw_markers(

@_log_if_debug_on
def draw_path_collection(self, gc, master_transform, paths, all_transforms,
offsets, offsetTrans, facecolors, edgecolors,
offsets, offset_trans, facecolors, edgecolors,
linewidths, linestyles, antialiaseds, urls,
offset_position):
# Is the optimization worth it? Rough calculation:
Expand All @@ -548,7 +548,7 @@ def draw_path_collection(self, gc, master_transform, paths, all_transforms,
if not should_do_optimization:
return RendererBase.draw_path_collection(
self, gc, master_transform, paths, all_transforms,
offsets, offsetTrans, facecolors, edgecolors,
offsets, offset_trans, facecolors, edgecolors,
linewidths, linestyles, antialiaseds, urls,
offset_position)

Expand All @@ -567,7 +567,7 @@ def draw_path_collection(self, gc, master_transform, paths, all_transforms,
path_codes.append(name)

for xo, yo, path_id, gc0, rgbFace in self._iter_collection(
gc, path_codes, offsets, offsetTrans,
gc, path_codes, offsets, offset_trans,
facecolors, edgecolors, linewidths, linestyles,
antialiaseds, urls, offset_position):
ps = "%g %g %s" % (xo, yo, path_id)
Expand Down
6 changes: 3 additions & 3 deletions 6 lib/matplotlib/backends/backend_svg.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ def draw_markers(
writer.end('g')

def draw_path_collection(self, gc, master_transform, paths, all_transforms,
offsets, offsetTrans, facecolors, edgecolors,
offsets, offset_trans, facecolors, edgecolors,
linewidths, linestyles, antialiaseds, urls,
offset_position):
# Is the optimization worth it? Rough calculation:
Expand All @@ -735,7 +735,7 @@ def draw_path_collection(self, gc, master_transform, paths, all_transforms,
if not should_do_optimization:
return super().draw_path_collection(
gc, master_transform, paths, all_transforms,
offsets, offsetTrans, facecolors, edgecolors,
offsets, offset_trans, facecolors, edgecolors,
linewidths, linestyles, antialiaseds, urls,
offset_position)

Expand All @@ -753,7 +753,7 @@ def draw_path_collection(self, gc, master_transform, paths, all_transforms,
writer.end('defs')

for xo, yo, path_id, gc0, rgbFace in self._iter_collection(
gc, path_codes, offsets, offsetTrans,
gc, path_codes, offsets, offset_trans,
facecolors, edgecolors, linewidths, linestyles,
antialiaseds, urls, offset_position):
url = gc0.get_url()
Expand Down
2 changes: 1 addition & 1 deletion 2 lib/matplotlib/backends/backend_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def draw_path(self, gc, path, transform, rgbFace=None):
# relative timings by leaving it out. backend implementers concerned with
# performance will probably want to implement it
# def draw_path_collection(self, gc, master_transform, paths,
# all_transforms, offsets, offsetTrans,
# all_transforms, offsets, offset_trans,
# facecolors, edgecolors, linewidths, linestyles,
# antialiaseds):
# pass
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.