Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Don't use the renderer.
  • Loading branch information
mdehoon committed Jun 16, 2015
commit d429c71e28f63b0d1b76078c7f71013f0504402d
10 changes: 5 additions & 5 deletions lib/matplotlib/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -774,14 +774,14 @@ def draw(self, renderer):
clean_line, ismath = textobj.is_math_text(line)

if textobj.get_path_effects():
from matplotlib.patheffects import PathEffectRenderer
textrenderer = PathEffectRenderer(
textobj.get_path_effects(), renderer)
path_effects = textobj.get_path_effects()
if textobj.get_usetex():
ismath = "TeX"
path, transform = textrenderer._get_text_path_transform(x, y, clean_line, prop, angle, ismath)
path, transform = renderer._get_text_path_transform(x, y, clean_line, prop, angle, ismath)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pep8 is choking on this line.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True. I have modified the line to follow the PEP8 conventions.

-Michiel.


On Wed, 6/17/15, Thomas A Caswell [email protected] wrote:

Subject: Re: [matplotlib] Fix for issue4024 (#4532)
To: "matplotlib/matplotlib" [email protected]
Cc: "mdehoon" [email protected]
Date: Wednesday, June 17, 2015, 1:07 PM

In lib/matplotlib/text.py:

@@ -771,19 +774,23 @@ def
draw(self, renderer):
clean_line, ismath =
textobj.is_math_text(line)

             if textobj.get_path_effects():
  •                from matplotlib.patheffects import
    
    PathEffectRenderer

- textrenderer = PathEffectRenderer(

textobj.get_path_effects(), renderer)

  •                path_effects =
    
    textobj.get_path_effects()
  •                if textobj.get_usetex():
    
  •                    ismath = "TeX"
    
  •                path, transform =
    
    renderer._get_text_path_transform(x, y, clean_line, prop,
    angle, ismath)

pep8 is choking on this line.


Reply to this email directly or view
it on GitHub.

gc.set_linewidth(0.0)
textrenderer.draw_path(gc, path, transform, rgbFace=color)
for path_effect in path_effects:
path_effect.draw_path(renderer, gc, path, transform,
rgbFace=color)
else:
gc.set_foreground(color)
if textobj.get_usetex():
Expand Down