1 | initial version |

Thank you, @sebastien. From your comment and documentation references, it seems clear that:

- The
`%matplotlib`

is an IPython-only mechanism; and - SageMath's command-line IPython backend currently doesn't support
`matplolib`

GUI.

The second conclusion comes from the reported by `get_display_manager().supported_output()`

:

```
frozenset({...,
<class 'sage.repl.rich_output.output_graphics.OutputImageDvi'>,
<class 'sage.repl.rich_output.output_graphics.OutputImageGif'>,
<class 'sage.repl.rich_output.output_graphics.OutputImagePdf'>,
<class 'sage.repl.rich_output.output_graphics.OutputImagePng'>, ...})
```

The only other output types for 2D images defined in Sage's library are for JPEG and SVG files. Not a single mention to `matplotlib`

GUI backends. It would be necessary to define a new output type class in order to use it natively in Sage, although it doesn't seem too hard to implement.

For now, I'll live with the `Graphics2d`

to `matplotlib`

object conversion!

2 | No.2 Revision |

Thank you, ~~@sebastien. ~~@23197. From your comment and documentation references, it seems clear that:

- The
`%matplotlib`

is an IPython-only mechanism; and - SageMath's command-line IPython backend currently doesn't support
`matplolib`

GUI.

The second conclusion comes from the reported by `get_display_manager().supported_output()`

:

```
frozenset({...,
<class 'sage.repl.rich_output.output_graphics.OutputImageDvi'>,
<class 'sage.repl.rich_output.output_graphics.OutputImageGif'>,
<class 'sage.repl.rich_output.output_graphics.OutputImagePdf'>,
<class 'sage.repl.rich_output.output_graphics.OutputImagePng'>, ...})
```

The only other output types for 2D images defined in Sage's library are for JPEG and SVG files. Not a single mention to `matplotlib`

GUI backends. It would be necessary to define a new output type class in order to use it natively in Sage, although it doesn't seem too hard to implement.

For now, I'll live with the `Graphics2d`

to `matplotlib`

object conversion!

3 | No.3 Revision |

Thank you, ~~@23197. ~~@sebastien. From your comment and documentation references, it seems clear that:

- The
`%matplotlib`

is an IPython-only mechanism; and - SageMath's command-line IPython backend currently doesn't support
`matplolib`

GUI.

The second conclusion comes from the reported by `get_display_manager().supported_output()`

:

```
frozenset({...,
<class 'sage.repl.rich_output.output_graphics.OutputImageDvi'>,
<class 'sage.repl.rich_output.output_graphics.OutputImageGif'>,
<class 'sage.repl.rich_output.output_graphics.OutputImagePdf'>,
<class 'sage.repl.rich_output.output_graphics.OutputImagePng'>, ...})
```

The only other output types for 2D images defined in Sage's library are for JPEG and SVG files. Not a single mention to `matplotlib`

GUI backends. It would be necessary to define a new output type class in order to use it natively in Sage, although it doesn't seem too hard to implement.

For now, I'll live with the `Graphics2d`

to `matplotlib`

object conversion!

4 | No.4 Revision |

Thank you, ~~@sebastien. ~~@sébastien. From your comment and documentation references, it seems clear that:

- The
`%matplotlib`

is an IPython-only mechanism; and - SageMath's command-line IPython backend currently doesn't support
`matplolib`

GUI.

The second conclusion comes from the reported by `get_display_manager().supported_output()`

:

`matplotlib`

GUI backends. It would be necessary to define a new output type class in order to use it natively in Sage, although it doesn't seem too hard to implement.

For now, I'll live with the `Graphics2d`

to `matplotlib`

object conversion!

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.