Skip to content

Commit

Permalink
FIX: Only render single patch for scatter
Browse files Browse the repository at this point in the history
  • Loading branch information
mdboom authored and tacaswell committed Oct 18, 2016
1 parent b9ba7ea commit 25fbe8f
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 94 deletions.
2 changes: 1 addition & 1 deletion lib/matplotlib/legend_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ def get_sizes(self, legend, orig_handle,
numpoints = self.get_numpoints(legend)
if numpoints < 4:
sizes = [.5 * (size_max + size_min), size_max,
size_min]
size_min][:numpoints]
else:
rng = (size_max - size_min)
sizes = rng * np.linspace(0, 1, numpoints) + size_min
Expand Down
Binary file modified lib/matplotlib/tests/baseline_images/test_legend/scatter_rc1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
152 changes: 61 additions & 91 deletions lib/matplotlib/tests/baseline_images/test_legend/scatter_rc1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions lib/matplotlib/tests/test_backend_bases.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ def test_uses_per_path():
def check(master_transform, paths, all_transforms,
offsets, facecolors, edgecolors):
rb = RendererBase()
raw_paths = list(rb._iter_collection_raw_paths(master_transform,
paths, all_transforms))
raw_paths = list(rb._iter_collection_raw_paths(
master_transform, paths, all_transforms))
gc = rb.new_gc()
ids = [path_id for xo, yo, path_id, gc0, rgbFace in
rb._iter_collection(gc, master_transform, all_transforms,
Expand Down

0 comments on commit 25fbe8f

Please sign in to comment.