Replace `gen_rst` Sphinx extension with `plot2rst` #190

Merged
merged 5 commits into from Jun 25, 2012

Projects

None yet

2 participants

@tonysyu
Member
tonysyu commented May 16, 2012

plot2rst is an update of the gen_rst extension which adds the ability to interweave code, text, and plots. See mpltools for details.

@stefanv stefanv commented on an outdated diff Jun 25, 2012
doc/ext/plot2rst.py
+import matplotlib
+matplotlib.use('Agg')
+import matplotlib.pyplot as plt
+from matplotlib import image
+
+
+LITERALINCLUDE = """
+.. literalinclude:: {src_name}
+ :lines: {code_start}-
+
+"""
+
+CODE_LINK = """
+
+**Python source code:** :download:`download <{0}>`
+(generated using ``mpltools`` |version|)
@stefanv stefanv merged commit b8d43b2 into scikit-image:master Jun 25, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment