Skip to content

Intermittent SVG error in the notebook #8133

Description

@moble

I have long had a problem with SVG matplotlib output in the notebook. Intermittently, the plot will extend outside of the axes, as exemplified in this screenshot:

matplotlibsvgnotebookbug

Basically, everything below the horizontal axis should be hidden. Most of the time, it is properly hidden -- e.g., when the plot is first made, or when I collapse and expand the output area. But then sometimes, it'll go buggy like this. I can't reproduce this consistently, but it seems to happen most often when I make a plot in another cell.

That stuff that's usually hidden evidently does correspond to actual data; when I plot again with xlim(xmin=1e-18), the data does show up just like that, except that it is correctly based at 1e-18. So it's evidently really in the SVG.

I'm wondering if this is related to #1881 and #2647, but none of the descriptions of problems there were specific enough. Is this expected badness in the matplotlib output?

I've had this problem for a long time (years?), but I can verify that it exists currently in IPython 3.0.0. I'm seeing it in up-to-date Chrome and Safari on up-to-date OS X, using an up-to-date anaconda installation (python 2.7). Here are the IPython details:

{'commit_hash': u'f75fda4',
'commit_source': 'installation',
'default_encoding': 'UTF-8',
'ipython_path': ..../anaconda/lib/python2.7/site-packages/IPython',
'ipython_version': '3.0.0',
'os_name': 'posix',
'platform': 'Darwin-14.1.0-x86_64-i386-64bit',
'sys_executable': '/Users/boyle/.continuum/anaconda/bin/python',
'sys_platform': 'darwin',
'sys_version': '2.7.9 |Continuum Analytics, Inc.| (default, Dec 15 2014, 10:37:34) \n[GCC 4.2.1 (Apple Inc. build 5577)]'}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions