@@ -814,7 +814,9 @@ from having an plot generated insert "sgskip" somewhere in the filename.
814
814
815
815
The format of these files is relatively straightforward. Properly
816
816
formatted comment blocks are treated as ReST _ text, the code is
817
- displayed, and figures are put into the built page.
817
+ displayed, and figures are put into the built page. Matplotlib uses the
818
+ ``# %% `` section separator so that IDEs will identify "code cells" to make
819
+ it easy to re-run sub-sections of the example.
818
820
819
821
For instance the example :doc: `/gallery/lines_bars_and_markers/simple_plot `
820
822
example is generated from
@@ -853,7 +855,7 @@ Tutorials are made with the exact same mechanism, except they are longer, and
853
855
typically have more than one comment block (i.e.
854
856
:doc: `/tutorials/introductory/quick_start `). The first comment block
855
857
can be the same as the example above. Subsequent blocks of ReST text
856
- are delimited by a line of ``### `` characters :
858
+ are delimited by the line ``# %% `` :
857
859
858
860
.. code-block :: python
859
861
@@ -868,7 +870,7 @@ are delimited by a line of ``###`` characters:
868
870
ax.grid()
869
871
plt.show()
870
872
871
- # #########################################################################
873
+ # %%
872
874
# Second plot
873
875
# ===========
874
876
#
@@ -887,7 +889,7 @@ bottom as follows
887
889
888
890
.. code-block :: python
889
891
890
- # ##############################################################################
892
+ # %%
891
893
#
892
894
# .. admonition:: References
893
895
#
0 commit comments