Skip to content

Commit 31a8093

Browse files
TarasKuzyoNelleV
authored andcommitted
Added xkcd Style for Markers (plot only) (#11558)
* added xkcd style for markers * added a test case and baseline images for xkcd plot with markers * updated baseline images for test_xkcd
1 parent 6c9c844 commit 31a8093

File tree

6 files changed

+22
-12166
lines changed

6 files changed

+22
-12166
lines changed

lib/matplotlib/lines.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,9 @@ def draw(self, renderer):
790790
self.get_markerfacecolor(), "none")):
791791
ec_rgba = ec_rgba[:3] + (fc_rgba[3],)
792792
gc.set_foreground(ec_rgba, isRGBA=True)
793+
if self.get_sketch_params() is not None:
794+
scale, length, randomness = self.get_sketch_params()
795+
gc.set_sketch_params(scale/2, length/2, 2*randomness)
793796

794797
marker = self._marker
795798

@@ -830,7 +833,6 @@ def draw(self, renderer):
830833
else:
831834
# Don't scale for pixels, and don't stroke them
832835
marker_trans = marker_trans.scale(w)
833-
834836
renderer.draw_markers(gc, marker_path, marker_trans,
835837
subsampled, affine.frozen(),
836838
fc_rgba)
Binary file not shown.
1.51 KB
Loading

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy