Skip to content

nbconvert cannot deal with notebooks containing svg images #1863

Open

Description

Description

If you use something like matplotlib_inline.backend_inline.set_matplotlib_formats('svg') then matplotlib produces images in the svg format. In many situations this is a good thing with respect to the image quality.

However, if you have this kind of images in the notebook, then nbconvert cannot deal with them.

Reproduce

  1. Create a cell with

    from matplotlib import pyplot as plt
    import matplotlib_inline
    matplotlib_inline.backend_inline.set_matplotlib_formats('svg')

    and evaluate it

  2. Create a cell with

    plt.plot([0,0],[1,1])

    and evaluate it

  3. Use jupyter nbconvert to convert the notebook to html.

  4. Open the html with a browser

Expected behavior

You should see a plot after point 2. above and then that should be also in the webpage seen at point 4. However at 4. you get a web page with no plot.

Activity

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions