@@ -384,8 +384,7 @@ def __init__(self, figure, fh):
384384 self .figure = figure
385385 self .image_counter = 0
386386
387- def draw_markers (self , gc , marker_path , marker_trans , path , trans ,
388- rgbFace = None ):
387+ def draw_markers (self , gc , marker_path , marker_trans , path , trans , rgbFace = None ):
389388 # docstring inherited
390389
391390 _writeln (self .fh , r"\begin{pgfscope}" )
@@ -404,8 +403,7 @@ def draw_markers(self, gc, marker_path, marker_trans, path, trans,
404403 r"\pgfsys@defobject{currentmarker}"
405404 r"{\pgfqpoint{%fin}{%fin}}{\pgfqpoint{%fin}{%fin}}{" % coords )
406405 self ._print_pgf_path (None , marker_path , marker_trans )
407- self ._pgf_path_draw (stroke = gc .get_linewidth () != 0.0 ,
408- fill = rgbFace is not None )
406+ self ._pgf_path_draw (stroke = gc .get_linewidth () != 0.0 , fill = rgbFace is not None )
409407 _writeln (self .fh , r"}" )
410408
411409 maxcoord = 16383 / 72.27 * self .dpi # Max dimensions in LaTeX.
@@ -429,8 +427,7 @@ def draw_path(self, gc, path, transform, rgbFace=None):
429427 self ._print_pgf_clip (gc )
430428 self ._print_pgf_path_styles (gc , rgbFace )
431429 self ._print_pgf_path (gc , path , transform , rgbFace )
432- self ._pgf_path_draw (stroke = gc .get_linewidth () != 0.0 ,
433- fill = rgbFace is not None )
430+ self ._pgf_path_draw (stroke = gc .get_linewidth () != 0.0 , fill = rgbFace is not None )
434431 _writeln (self .fh , r"\end{pgfscope}" )
435432
436433 # if present, draw pattern on top
@@ -453,6 +450,8 @@ def draw_path(self, gc, path, transform, rgbFace=None):
453450 r"{\pgfqpoint{0in}{0in}}{\pgfqpoint{1in}{1in}}" )
454451 _writeln (self .fh , r"\pgfusepath{clip}" )
455452 scale = mpl .transforms .Affine2D ().scale (self .dpi )
453+ lw = (mpl .rcParams ["hatch.linewidth" ] * mpl_pt_to_in * latex_in_to_pt )
454+ _writeln (self .fh , r"\pgfsetlinewidth{%fpt}" % lw )
456455 self ._print_pgf_path (None , gc .get_hatch_path (), scale )
457456 self ._pgf_path_draw (stroke = True )
458457 _writeln (self .fh , r"\end{pgfscope}" )
@@ -464,8 +463,7 @@ def draw_path(self, gc, path, transform, rgbFace=None):
464463 xmin , xmax = f * xmin , f * xmax
465464 ymin , ymax = f * ymin , f * ymax
466465 repx , repy = math .ceil (xmax - xmin ), math .ceil (ymax - ymin )
467- _writeln (self .fh ,
468- r"\pgfsys@transformshift{%fin}{%fin}" % (xmin , ymin ))
466+ _writeln (self .fh , r"\pgfsys@transformshift{%fin}{%fin}" % (xmin , ymin ))
469467 for iy in range (repy ):
470468 for ix in range (repx ):
471469 _writeln (self .fh , r"\pgfsys@useobject{currentpattern}{}" )
0 commit comments