@@ -384,8 +384,7 @@ def __init__(self, figure, fh):
384
384
self .figure = figure
385
385
self .image_counter = 0
386
386
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 ):
389
388
# docstring inherited
390
389
391
390
_writeln (self .fh ,r"\begin{pgfscope}" )
@@ -404,8 +403,7 @@ def draw_markers(self, gc, marker_path, marker_trans, path, trans,
404
403
r"\pgfsys@defobject{currentmarker}"
405
404
r"{\pgfqpoint{%fin}{%fin}}{\pgfqpoint{%fin}{%fin}}{" % coords )
406
405
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 )
409
407
_writeln (self .fh ,r"}" )
410
408
411
409
maxcoord = 16383 / 72.27 * self .dpi # Max dimensions in LaTeX.
@@ -429,8 +427,7 @@ def draw_path(self, gc, path, transform, rgbFace=None):
429
427
self ._print_pgf_clip (gc )
430
428
self ._print_pgf_path_styles (gc ,rgbFace )
431
429
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 )
434
431
_writeln (self .fh ,r"\end{pgfscope}" )
435
432
436
433
# if present, draw pattern on top
@@ -453,6 +450,8 @@ def draw_path(self, gc, path, transform, rgbFace=None):
453
450
r"{\pgfqpoint{0in}{0in}}{\pgfqpoint{1in}{1in}}" )
454
451
_writeln (self .fh ,r"\pgfusepath{clip}" )
455
452
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 )
456
455
self ._print_pgf_path (None ,gc .get_hatch_path (),scale )
457
456
self ._pgf_path_draw (stroke = True )
458
457
_writeln (self .fh ,r"\end{pgfscope}" )
@@ -464,8 +463,7 @@ def draw_path(self, gc, path, transform, rgbFace=None):
464
463
xmin ,xmax = f * xmin ,f * xmax
465
464
ymin ,ymax = f * ymin ,f * ymax
466
465
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 ))
469
467
for iy in range (repy ):
470
468
for ix in range (repx ):
471
469
_writeln (self .fh ,r"\pgfsys@useobject{currentpattern}{}" )