Skip to content

Commit c353bc4

Browse files
committed
removed sphinx files which are now in plotly-sphinx-gallery
+ changed name of renderer sphinx -> sphinx-gallery, and changed wording of documentation
1 parent c76736e commit c353bc4

File tree

10 files changed

+9
-349
lines changed

10 files changed

+9
-349
lines changed

doc/Makefile

Lines changed: 0 additions & 28 deletions
This file was deleted.

doc/api.rst

Lines changed: 0 additions & 15 deletions
This file was deleted.

doc/conf.py

Lines changed: 0 additions & 199 deletions
This file was deleted.

doc/index.rst

Lines changed: 0 additions & 24 deletions
This file was deleted.

doc/tutorial.rst

Lines changed: 0 additions & 4 deletions
This file was deleted.

examples/README.txt

Lines changed: 0 additions & 4 deletions
This file was deleted.

examples/plot_plotly.py

Lines changed: 0 additions & 36 deletions
This file was deleted.

examples/plot_plotly_3d.py

Lines changed: 0 additions & 31 deletions
This file was deleted.

plotly/io/_renderers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ def show(fig, renderer=None, validate=True, **kwargs):
395395
renderers['chrome'] = BrowserRenderer(config=config, using='chrome')
396396
renderers['chromium'] = BrowserRenderer(config=config, using='chromium')
397397
renderers['iframe'] = IFrameRenderer(config=config)
398-
renderers['sphinx'] = SphinxGalleryRenderer()
398+
renderers['sphinx_gallery'] = SphinxGalleryRenderer()
399399

400400
# Set default renderer
401401
# --------------------

plotly/io/_sg_scraper.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
# This module defines an image scraper for sphinx-gallery
22
# https://sphinx-gallery.github.io/
33
# which can be used by projects using plotly in their documentation.
4-
# This module monkey-patches plotly.offline.plot, so we do not
5-
# import it in __init__.py
64
import inspect, os
75

86
import plotly
97
from glob import glob
108
import shutil
119

12-
plotly.io.renderers.default = 'sphinx'
10+
plotly.io.renderers.default = 'sphinx_gallery'
1311

1412

1513
def plotly_sg_scraper(block, block_vars, gallery_conf, **kwargs):
16-
"""Scrape Plotly figures.
14+
"""Scrape Plotly figures for galleries of examples using
15+
sphinx-gallery.
1716
18-
Since the monkey-patched version of plotly.offline.plot generates
19-
both html and static png files, we simply crawl these files and give
20-
them the appropriate path.
17+
Examples should use ``plotly.io.show()`` to display the figure with
18+
the custom sphinx_gallery renderer.
19+
20+
Since the sphinx_gallery renderer generates both html and static png
21+
files, we simply crawl these files and give them the appropriate path.
2122
2223
Parameters
2324
----------

0 commit comments

Comments
 (0)