Skip to content

Incorrect TextPath display under interactive mode #6049

Closed

Description

@qinggeng

matplotlib version 1.5.1 installed from pip
osx 10.9.5
python version: 2.7.11 installed from source code

source code:

from pylab import *
from matplotlib.text import TextPath
from matplotlib.patches import PathPatch
t = TextPath((0, 20), u'ABCDEFGHIJK')
tp = PathPatch(t, color='k', fill = False)
plt.gca().set_xlim(-100, 100)
plt.gca().set_ylim(0, 50)
plt.gca().add_artist(tp)
plt.show()

result screenshot:
mac_display_bug

However, the saved image is correct(saved from save button):
mpl_hollo_textpathbug

Activity

  1. WeatherGod commented on Feb 23, 2016

    @WeatherGod
    Member

    Wow, I never knew this feature existed!

    I just tried it against master and v1.5.1, and couldn't reproduce it on my
    linux box. Perhaps it is a macosx backend bug? Could you try a different
    backend like Qt4Agg?

    On Mon, Feb 22, 2016 at 10:27 PM, qinggeng notifications@github.com wrote:

    matplotlib version 1.5.1 installed from pip
    osx 10.9.5
    python version: 2.7.11 installed from source code

    source code:

    from pylab import *from matplotlib.text import TextPathfrom matplotlib.patches import PathPatch
    t = TextPath((0, 20), u'ABCDEFGHIJK')
    tp = PathPatch(t, color='k', fill = False)
    plt.gca().set_xlim(-100, 100)
    plt.gca().set_ylim(0, 50)
    plt.gca().add_artist(tp)
    plt.show()

    result screenshot:
    [image: mac_display_bug]
    https://cloud.githubusercontent.com/assets/1065213/13240597/d1ff8118-da1e-11e5-8fe0-2f2d35f97265.png

    However, the saved image is correct(saved from save button):
    [image: mpl_hollo_textpathbug]
    https://cloud.githubusercontent.com/assets/1065213/13240749/14f54402-da20-11e5-8f80-88992c322e38.png

    —
    Reply to this email directly or view it on GitHub
    #6049.

  2. added this to the milestone on Feb 23, 2016
  3. mdboom commented on Feb 29, 2016

    @mdboom
    Member

    I can confirm @WeatherGod's hunch that this is a macosx-backend specific bug. We have medium-term plans to replace the macosx backend with one that does its rendering with Agg to get around these kinds of things.

  4. mdboom commented on Mar 21, 2016

    @mdboom
    Member

    Fixed by #6178

  5. modified the milestones: , on Mar 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions