Skip to content
Browse files

Making plot_elements.rst static

  • Loading branch information...
1 parent eba94c3 commit f4f23012084b15b5ffce949c099158206a9802a3 @alexras committed
Showing with 67 additions and 44 deletions.
  1. +0 −1 .gitignore
  2. +0 −43 docs/gen_plot_element_docs.py
  3. +67 −0 docs/plot_elements.rst
View
1 .gitignore
@@ -9,4 +9,3 @@ htmlcov
docs/_build
.\#*
docs/examples*.rst
-docs/plot_elements.rst
View
43 docs/gen_plot_element_docs.py
@@ -1,43 +0,0 @@
-#!/usr/bin/env python
-
-import subprocess
-import os
-import shlex
-
-with open("plot_elements.rst", "w+") as fp:
- # Get a list of all classes that subclass
- subproc = subprocess.Popen(
- 'grep -lE "class .*?\(PlotInfo\)" ../*.py', stdout=subprocess.PIPE,
- stderr=None, shell=True)
-
- (stdout, stderr) = subproc.communicate()
-
- print >>fp, """
-Plot Elements
-=============
-
-
-.. autoclass:: boomslang.PlotInfo.PlotInfo
- :members:
- :undoc-members:
-"""
-
- for line in stdout.split():
- line = os.path.basename(line.strip())
-
- if line[:2] == "__":
- continue
-
- class_name = line[:-3]
-
- print >>fp, """
-%(class_name)s
-%(underline)s
-.. autoclass:: boomslang.%(class_name)s.%(class_name)s
- :members:
- :inherited-members:
- :undoc-members:""" % {
- "class_name" : class_name,
- "underline" : '-' * len(class_name)
- }
-
View
67 docs/plot_elements.rst
@@ -0,0 +1,67 @@
+Plot Elements
+=============
+
+Plot elements in Boomslang are represented by objects that encapsulate all the
+state that a plot element needs to draw itself. The one required method that
+all plot elements must implement is `draw(self, fig, axes)`, which the element
+uses to draw itself within the figure `fig` on the axes `axes`.
+
+PlotInfo: The Common Plot Element Base Class
+--------------------------------------------
+
+Many of Boomslang's plot elements inherit from PlotInfo. PlotInfo contains
+several useful fields (x-axis and y-axis values, error bars, etc.)
+
+.. autoclass:: boomslang.PlotInfo.PlotInfo
+ :members:
+
+Simple Plot Elements
+--------------------
+
+Boomslang comes equipped with the standard plot elements for making lines, bar
+graphs, scatter plots, and box-and-whisker plots.
+
+.. autoclass:: boomslang.Line.Line
+ :members:
+
+.. autoclass:: boomslang.HLine.HLine
+ :members:
+
+.. autoclass:: boomslang.VLine.VLine
+ :members:
+
+.. autoclass:: boomslang.Scatter.Scatter
+ :members:
+
+.. autoclass:: boomslang.Bar.Bar
+ :members:
+
+.. autoclass:: boomslang.BoxAndWhisker.BoxAndWhisker
+ :members:
+
+
+Compound Plot Elements
+----------------------
+
+Boomslang can combine certain plot elements together to easily create stacks
+and clusters of plot elements while maintaining the individual elements
+themselves, making it easy to re-compose them by changing a couple of lines of
+code.
+
+.. autoclass:: boomslang.ClusteredBars.ClusteredBars
+ :members:
+
+.. autoclass:: boomslang.StackedBars.StackedBars
+ :members:
+
+.. autoclass:: boomslang.StackedLines.StackedLines
+ :members:
+
+Miscellaneous Plot Elements
+---------------------------
+
+.. autoclass:: boomslang.Label.Label
+ :members:
+
+.. autoclass:: boomslang.Grid.Grid
+ :members:

0 comments on commit f4f2301

Please sign in to comment.
Something went wrong with that request. Please try again.