Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2c7348a

Browse files
committed
minor docstring fixes
svn path=/trunk/matplotlib/; revision=2069
1 parent d53220d commit 2c7348a

3 files changed

Lines changed: 17 additions & 21 deletions

File tree

lib/matplotlib/axes.py

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -315,25 +315,18 @@ def _grab_next_args(self, *args, **kwargs):
315315
#yield self._plot_2_args(remaining[:2])
316316
#remaining=args[2:]
317317

318-
BinOpType=type(zero())
318+
ValueType=type(zero())
319319
def makeValue(v):
320-
if type(v) == BinOpType:
320+
if type(v) == ValueType:
321321
return v
322322
else:
323323
return Value(v)
324324

325325

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

339332
scaled = {IDENTITY : 'linear',
@@ -682,7 +675,7 @@ def cla(self):
682675
self._gridOn = rcParams['axes.grid']
683676
self.lines = []
684677
self.patches = []
685-
self.texts = [] # text in axis coords
678+
self.texts = []
686679
self.tables = []
687680
self.artists = []
688681
self.images = []

lib/matplotlib/figure.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -383,11 +383,12 @@ def add_axes(self, *args, **kwargs):
383383
"""
384384
Add an a axes with axes rect [left, bottom, width, height] where all
385385
quantities are in fractions of figure width and height. kwargs are
386-
legal Axes kwargs plus"polar" which sets whether to create a polar axes
386+
legal Axes kwargs plus "polar" which sets whether to create a polar axes
387387
388-
add_axes((l,b,w,h))
389-
add_axes((l,b,w,h), frameon=False, axisbg='g')
390-
add_axes((l,b,w,h), polar=True)
388+
rect = l,b,w,h
389+
add_axes(rect)
390+
add_axes(rect, frameon=False, axisbg='g')
391+
add_axes(rect, polar=True)
391392
add_axes(ax) # add an Axes instance
392393
393394
@@ -396,11 +397,11 @@ def add_axes(self, *args, **kwargs):
396397
behavior, eg you want to force the creation of a new axes, you must
397398
use a unique set of args and kwargs. The artist "label" attribute has
398399
been exposed for this purpose. Eg, if you want two axes that are
399-
otherwise identical to be added to the axes, make sure you give them
400+
otherwise identical to be added to the figure, make sure you give them
400401
unique labels:
401402
402-
add_axes((l,b,w,h), label='1')
403-
add_axes((l,b,w,h), label='2')
403+
add_axes(rect, label='axes1')
404+
add_axes(rect, label='axes2')
404405
405406
The Axes instance will be returned
406407
"""
@@ -496,7 +497,7 @@ def clear(self):
496497

497498
def draw(self, renderer):
498499
"""
499-
Render the figure using RendererGD instance renderer
500+
Render the figure using Renderer instance renderer
500501
"""
501502
# draw the figure bounding box, perhaps none for white figure
502503
#print 'figure draw'

matplotlibrc.template

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ font.monospace : Andale Mono, Bitstream Vera Sans Mono, Nimbus Mono L, Cour
122122
# information on text properties
123123
text.color : black
124124
text.usetex : False # use latex for all text handling. See http://matplotlib.sf.net/matplotlib.texmanager.html
125-
text.dvipnghack : False
125+
text.dvipnghack : False # some versions of dvipng don't handle
126+
# alpha channel properly. Use True to correct and flush
127+
# ~/.matplotlib/tex.cache before testing
126128

127129
### AXES
128130
# default face and edge color, default tick sizes,

0 commit comments

Comments
 (0)