Skip to content

Commit

Permalink
minor docstring fixes
Browse files Browse the repository at this point in the history
svn path=/trunk/matplotlib/; revision=2069
  • Loading branch information
jdh2358 committed Feb 22, 2006
1 parent d53220d commit 2c7348a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 21 deletions.
17 changes: 5 additions & 12 deletions lib/matplotlib/axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,25 +315,18 @@ def _grab_next_args(self, *args, **kwargs):
#yield self._plot_2_args(remaining[:2])
#remaining=args[2:]

BinOpType=type(zero())
ValueType=type(zero())
def makeValue(v):
if type(v) == BinOpType:
if type(v) == ValueType:
return v
else:
return Value(v)


class Axes(Artist):
"""
Emulate matlab's (TM) axes command, creating axes with
Axes(position=[left, bottom, width, height])
where all the arguments are fractions in [0,1] which specify the
fraction of the total figure window.
axisbg is the color of the axis background
The Axes contains most of the figure elements: Axis, Tick, Line2D,
Text, Polygon etc, and sets the coordinate system
"""

scaled = {IDENTITY : 'linear',
Expand Down Expand Up @@ -682,7 +675,7 @@ def cla(self):
self._gridOn = rcParams['axes.grid']
self.lines = []
self.patches = []
self.texts = [] # text in axis coords
self.texts = []
self.tables = []
self.artists = []
self.images = []
Expand Down
17 changes: 9 additions & 8 deletions lib/matplotlib/figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,11 +383,12 @@ def add_axes(self, *args, **kwargs):
"""
Add an a axes with axes rect [left, bottom, width, height] where all
quantities are in fractions of figure width and height. kwargs are
legal Axes kwargs plus"polar" which sets whether to create a polar axes
legal Axes kwargs plus "polar" which sets whether to create a polar axes
add_axes((l,b,w,h))
add_axes((l,b,w,h), frameon=False, axisbg='g')
add_axes((l,b,w,h), polar=True)
rect = l,b,w,h
add_axes(rect)
add_axes(rect, frameon=False, axisbg='g')
add_axes(rect, polar=True)
add_axes(ax) # add an Axes instance
Expand All @@ -396,11 +397,11 @@ def add_axes(self, *args, **kwargs):
behavior, eg you want to force the creation of a new axes, you must
use a unique set of args and kwargs. The artist "label" attribute has
been exposed for this purpose. Eg, if you want two axes that are
otherwise identical to be added to the axes, make sure you give them
otherwise identical to be added to the figure, make sure you give them
unique labels:
add_axes((l,b,w,h), label='1')
add_axes((l,b,w,h), label='2')
add_axes(rect, label='axes1')
add_axes(rect, label='axes2')
The Axes instance will be returned
"""
Expand Down Expand Up @@ -496,7 +497,7 @@ def clear(self):

def draw(self, renderer):
"""
Render the figure using RendererGD instance renderer
Render the figure using Renderer instance renderer
"""
# draw the figure bounding box, perhaps none for white figure
#print 'figure draw'
Expand Down
4 changes: 3 additions & 1 deletion matplotlibrc.template
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ font.monospace : Andale Mono, Bitstream Vera Sans Mono, Nimbus Mono L, Cour
# information on text properties
text.color : black
text.usetex : False # use latex for all text handling. See http://matplotlib.sf.net/matplotlib.texmanager.html
text.dvipnghack : False
text.dvipnghack : False # some versions of dvipng don't handle
# alpha channel properly. Use True to correct and flush
# ~/.matplotlib/tex.cache before testing

### AXES
# default face and edge color, default tick sizes,
Expand Down

0 comments on commit 2c7348a

Please sign in to comment.