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

Skip to content

Commit 91e2e82

Browse files
committed
ENH last updates on cbook in the matplolib main codebase (docstrings)
1 parent 1857240 commit 91e2e82

File tree

7 files changed

+11
-10
lines changed

7 files changed

+11
-10
lines changed

lib/matplotlib/axes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ class Axes(martist.Artist):
338338
coordinate system.
339339
340340
The :class:`Axes` instance supports callbacks through a callbacks
341-
attribute which is a :class:`~matplotlib._cbook.CallbackRegistry`
341+
attribute which is a :class:`~matplotlib.utils.CallbackRegistry`
342342
instance. The events you can connect to are 'xlim_changed' and
343343
'ylim_changed' and the callback will be called with func(*ax*)
344344
where *ax* is the :class:`Axes` instance.

lib/matplotlib/mlab.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2809,7 +2809,7 @@ def griddata(x,y,z,xi,yi,interp='nn'):
28092809
def less_simple_linear_interpolation( x, y, xi, extrap=False ):
28102810
"""
28112811
This function provides simple (but somewhat less so than
2812-
:func:`_cbook.simple_linear_interpolation`) linear interpolation.
2812+
:func:`utils.simple_linear_interpolation`) linear interpolation.
28132813
:func:`simple_linear_interpolation` will give a list of point
28142814
between a start and an end, while this does true linear
28152815
interpolation at an arbitrary set of points.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
This is the sample data needed for some of matplotlib's examples and
2-
docs. See matplotlib.cbook.get_sample_data for more info.
2+
docs. See matplotlib.utils.get_sample_data for more info.

lib/matplotlib/textpath.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def __init__(self):
3232
self.mathtext_parser = MathTextParser('path')
3333
self.tex_font_map = None
3434

35-
from matplotlib._cbook import maxdict
35+
from matplotlib.utils import maxdict
3636
self._ps_fontd = maxdict(50)
3737

3838
self._texmanager = None

lib/matplotlib/ticker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
import math
129129
import numpy as np
130130
from matplotlib import rcParams
131-
from matplotlib import _cbook
131+
from matplotlib import utils
132132
from matplotlib import transforms as mtransforms
133133

134134

@@ -647,7 +647,7 @@ def __call__(self, x, pos=None):
647647
def format_data(self, value):
648648
b = self.labelOnlyBase
649649
self.labelOnlyBase = False
650-
value = _cbook.strip_math(self.__call__(value))
650+
value = utils.strip_math(self.__call__(value))
651651
self.labelOnlyBase = b
652652
return value
653653

lib/matplotlib/tri/triplot.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
from __future__ import print_function
2-
from matplotlib._cbook import ls_mapper
2+
from matplotlib.utils import ls_mapper
33
from matplotlib.patches import PathPatch
44
from matplotlib.path import Path
55
from matplotlib.tri.triangulation import Triangulation
66
import numpy as np
77

8+
89
def triplot(ax, *args, **kwargs):
910
"""
1011
Draw a unstructured triangular grid as lines and/or markers.
@@ -64,7 +65,7 @@ def triplot(ax, *args, **kwargs):
6465
kw['facecolor'] = None
6566

6667
vertices = np.column_stack((x[edges].flatten(), y[edges].flatten()))
67-
codes = ([Path.MOVETO] + [Path.LINETO])*len(edges)
68+
codes = ([Path.MOVETO] + [Path.LINETO]) * len(edges)
6869

6970
path = Path(vertices, codes)
7071
pathpatch = PathPatch(path, **kw)

lib/matplotlib/utils/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ class Grouper(object):
301301
302302
For example:
303303
304-
>>> from matplotlib._cbook import Grouper
304+
>>> from matplotlib.utils import Grouper
305305
>>> class Foo(object):
306306
... def __init__(self, s):
307307
... self.s = s
@@ -503,7 +503,7 @@ class CallbackRegistry:
503503
>>> def ondrink(x):
504504
... print 'drink', x
505505
506-
>>> from matplotlib._cbook import CallbackRegistry
506+
>>> from matplotlib.utils import CallbackRegistry
507507
>>> callbacks = CallbackRegistry()
508508
509509
>>> id_eat = callbacks.connect('eat', oneat)

0 commit comments

Comments
 (0)