Skip to content

Commit

Permalink
Merge pull request matplotlib#1931 from NelleV/axes_module
Browse files Browse the repository at this point in the history
[SPRINT] Refactored the axes module to split it in smaller chunks.
  • Loading branch information
dmcdougall committed Jun 29, 2013
2 parents 85123bb + 9412e84 commit 2930635
Show file tree
Hide file tree
Showing 10 changed files with 3,883 additions and 3,787 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
2013-06-26 Refactored the axes module: the axes module is now a folder,
containing the following submodule:
- _subplots.py, containing all the subplots helper methods
- _base.py, containing several private methods and a new
_AxesBase class. This _AxesBase class contains all the methods
that are not directly linked to plots of the "old" Axes
- _axes.py contains the Axes class. This class now inherits from
_AxesBase: it contains all "plotting" methods and labelling
methods.
This refactoring should not affect the API. Only private methods
are not importable from the axes module anymore.

2013-05-18 Added support for arbitrary rasterization resolutions to the
SVG backend. Previously the resolution was hard coded to 72
dpi. Now the backend class takes a image_dpi argument for
Expand Down
36 changes: 36 additions & 0 deletions doc/api/api_changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,42 @@ help figure out possible sources of the changes you are experiencing.
For new features that were added to matplotlib, please see
:ref:`whats-new`.

Changes in 1.4.x
================

* A major refactoring of the axes module was made. The axes module has been
splitted into smaller modules:

- the `_base` module, which contains a new private _AxesBase class. This
class contains all methods except plotting and labelling methods.
- the `axes` module, which contains the Axes class. This class inherits
from _AxesBase, and contains all plotting and labelling methods.
- the `_subplot` module, with all the classes concerning subplotting.

There are a couple of things that do not exists in the `axes` module's
namespace anymore. If you use them, you need to import them from their
original location:

- math -> `import math`
- ma -> `from numpy import ma`
- cbook -> `from matplotlib import cbook`
- division -> `from __future__ import division`
- docstring -> `from matplotlib impotr docstring`
- is_sequence_of_strings -> `from matplotlib.cbook import is_sequence_of_strings`
- is_string_like -> `from matplotlib.cbook import is_string_like`
- iterable -> `from matplotlib.cbook import iterable`
- itertools -> `import itertools`
- martist -> `from matplotlib import artist as martist`
- matplotlib -> `import matplotlib`
- mcoll -> `from matplotlib import collections as mcoll`
- mcolors -> `from matplotlib import colors as mcolors`
- mcontour -> `from matplotlib import contour as mcontour`
- mpatches -> `from matplotlib import patchs as mpatches`
- mpath -> `from matplotlib import path as mpath`
- mquiver -> `from matplotlib import quiver as mquiver`
- mstack -> `from matplotlib import stack as mstack`
- mstream -> `from matplotlib import stream as mstream`
- mtable -> `from matplotlib import table as mtable`

.. _changes_in_1_3:

Expand Down
3 changes: 3 additions & 0 deletions lib/matplotlib/axes/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from matplotlib.axes._subplots import *
from matplotlib.axes._axes import *
from matplotlib.axes._base import _string_to_bool
Loading

0 comments on commit 2930635

Please sign in to comment.