diff --git a/galleries/examples/images_contours_and_fields/contourf_hatching.py b/galleries/examples/images_contours_and_fields/contourf_hatching.py index 020c20b44ec4..b574afdd19af 100644 --- a/galleries/examples/images_contours_and_fields/contourf_hatching.py +++ b/galleries/examples/images_contours_and_fields/contourf_hatching.py @@ -32,7 +32,7 @@ n_levels = 6 ax2.contour(x, y, z, n_levels, colors='black', linestyles='-') cs = ax2.contourf(x, y, z, n_levels, colors='none', - hatches=['.', '/', '\\', None, '\\\\', '*'], + hatches=['.', '/', '\\', None, r'\\', '*'], extend='lower') # create a legend for the contour set diff --git a/galleries/examples/shapes_and_collections/hatch_demo.py b/galleries/examples/shapes_and_collections/hatch_demo.py index 8d44dba5489b..1ac7a3d8a858 100644 --- a/galleries/examples/shapes_and_collections/hatch_demo.py +++ b/galleries/examples/shapes_and_collections/hatch_demo.py @@ -40,7 +40,7 @@ axs['patches'].add_patch(Ellipse((4, 50), 10, 10, fill=True, hatch='*', facecolor='y')) axs['patches'].add_patch(Polygon([(10, 20), (30, 50), (50, 10)], - hatch='\\/...', facecolor='g')) + hatch=r'\/...', facecolor='g')) axs['patches'].set_xlim(0, 40) axs['patches'].set_ylim(10, 60) axs['patches'].set_aspect(1)