Renderer to display figures as static SVG images. This renderer requires either the kaleido package or the orca command-line utility and is broadly compatible across IPython environments (classic Jupyter Notebook, JupyterLab, QtConsole, VSCode, PyCharm, etc) and nbconvert targets (
| 161 | |
| 162 | |
| 163 | class SvgRenderer(ImageRenderer): |
| 164 | """ |
| 165 | Renderer to display figures as static SVG images. This renderer requires |
| 166 | either the kaleido package or the orca command-line utility and is broadly |
| 167 | compatible across IPython environments (classic Jupyter Notebook, JupyterLab, |
| 168 | QtConsole, VSCode, PyCharm, etc) and nbconvert targets (HTML, PDF, etc.). |
| 169 | |
| 170 | mime type: 'image/svg+xml' |
| 171 | """ |
| 172 | |
| 173 | def __init__(self, width=None, height=None, scale=None, engine=None): |
| 174 | super(SvgRenderer, self).__init__( |
| 175 | mime_type="image/svg+xml", |
| 176 | b64_encode=False, |
| 177 | format="svg", |
| 178 | width=width, |
| 179 | height=height, |
| 180 | scale=scale, |
| 181 | engine=engine, |
| 182 | ) |
| 183 | |
| 184 | |
| 185 | class JpegRenderer(ImageRenderer): |