changes to MEP12/sphinx-gallery compliant #8233

Merged
merged 2 commits into from Mar 8, 2017
@@ -1,7 +1,11 @@
-'''
-Demonstrates using ax.plot's zdir keyword to plot 2D scatterplot data on
+"""
+=======================
+Plot 2D data on 3D plot
+=======================
+
+Demonstrates using ax.plot's zdir keyword to plot 2D data on
selective axes of a 3D plot.
-'''
+"""
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
@@ -1,7 +1,11 @@
-'''
+"""
+========================================
+Create 2D bar graphs in different planes
+========================================
+
Demonstrates making a 3D plot which has 2D bar graphs projected onto
planes y=0, y=1, etc.
-'''
+"""
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
@@ -1,6 +1,10 @@
-'''
+"""
+==============================
+Create 3D histogram of 2D data
+==============================
+
Demo of a histogram for 2 dimensional data as a bar graph in 3D.
-'''
+"""
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
@@ -1,7 +1,12 @@
-'''
+"""
+============================
+Draw flat objects in 3D plot
+============================
+
Demonstrate using pathpatch_2d_to_3d to 'draw' shapes and text on a 3D plot.
-'''
+"""
+import numpy as np
@NelleV

NelleV Mar 8, 2017

Contributor

I wonder how this example even ran without numpy…

@anntzer

anntzer Mar 8, 2017

Contributor

It did not, so the question is, why was it not picked up by the gallery?

@NelleV

NelleV Mar 8, 2017

Contributor

That is super wierd…

@anntzer

anntzer Mar 8, 2017

Contributor

Can you open an issue to track this?

import matplotlib.pyplot as plt
from matplotlib.patches import Circle, PathPatch
# register Axes3D class with matplotlib by importing Axes3D
@@ -1,7 +1,12 @@
-'''
-Demonstrate how to create semi-transparent polygons which fill the space
-under a line graph, creating a sort of 'jagged stained glass' effect.
-'''
+"""
+=============================================
+Generate polygons to fill under 3D line graph
+=============================================
+
+Demonstrate how to create polygons which fill the space under a line
+graph. In this example polygons are semi-transparent, creating a sort
+of 'jagged stained glass' effect.
+"""
from mpl_toolkits.mplot3d import Axes3D
from matplotlib.collections import PolyCollection