| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -13,10 +13,11 @@ Axes Grid | |||
| 13 | 13 | --------- | |
| 14 | 14 | .. note:: | |
| 15 | 15 | ||
| 16 | - There is an older version of the AxesGrid toolkit, simply called ``axes_grid`` instead of | ||
| 17 | - ``axes_grid1``. the toolkit had a single namespace of axes_grid. This toolkit was broken | ||
| 18 | - into the two modules below. For the documentation on the original ``axes_grid`` | ||
| 19 | - module, see the `previous version of the docs | ||
| 16 | + There is an older version of the AxesGrid toolkit, ``axes_grid`` (instead of | ||
| 17 | + ``axes_grid1``). The old version had a single namespace for all axes_grid | ||
| 18 | + objects, and in the new version this toolkit was broken | ||
| 19 | + into the two modules below. For the documentation on ``axes_grid``, | ||
| 20 | + see the `previous version of the docs | ||
| 20 | 21 | <http://matplotlib.org/2.0.1/mpl_toolkits/axes_grid/index.html#toolkit-axesgrid-index>`_. | |
| 21 | 22 | ||
| 22 | 23 | .. autosummary:: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -33,13 +33,13 @@ mplot3d API | |||
| 33 | 33 | =================================== | |
| 34 | 34 | ||
| 35 | 35 | .. note:: | |
| 36 | - Historically, axis3d has suffered from having hard-coded constants | ||
| 37 | - controlling the look and feel of the 3D plot. This precluded user | ||
| 38 | - level adjustments such as label spacing, font colors and panel colors. | ||
| 39 | - For version 1.1.0, these constants have been consolidated into a single | ||
| 40 | - private member dictionary, `self._axinfo`, for the axis object. This is | ||
| 41 | - intended only as a stop-gap measure to allow user-level customization, | ||
| 42 | - but it is not intended to be permanent. | ||
| 36 | + See :attr:`mpl_toolkits.mplot3d.axis3d._axinfo` for a dictionary containing | ||
| 37 | + constants that may be modified for controlling the look and feel | ||
| 38 | + of mplot3d axes (e.g., label spacing, font colors and panel colors). | ||
| 39 | + Historically, axis3d has suffered from having hard-coded constants | ||
| 40 | + that precluded user adjustments, and this dictionary was implemented | ||
| 41 | + in version 1.1 as a stop-gap measure. | ||
| 42 | + | ||
| 43 | 43 | ||
| 44 | 44 | .. autosummary:: | |
| 45 | 45 | :toctree: ../_as_gen | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,11 +3,11 @@ | |||
| 3 | 3 | Matplotlib axisartist Toolkit | |
| 4 | 4 | ============================= | |
| 5 | 5 | ||
| 6 | - The *axisartist* namespace includes a derived Axes implementation. The | ||
| 7 | - biggest difference is that the artists responsible to draw axis line, | ||
| 8 | - ticks, ticklabel and axis labels are separated out from the mpl's Axis | ||
| 9 | - class, which are much more than artists in the original mpl. This | ||
| 10 | - change was strongly motivated to support curvilinear grid. | ||
| 6 | + The *axisartist* namespace includes a derived Axes implementation ( | ||
| 7 | + :class:`mpl_toolkits.axisartist.Axes`). The | ||
| 8 | + biggest difference is that the artists that are responsible for drawing | ||
| 9 | + axis lines, ticks, ticklabels, and axis labels are separated out from the | ||
| 10 | + mpl's Axis class. This change was strongly motivated to support curvilinear grid. | ||
| 11 | 11 | ||
| 12 | 12 | You can find a tutorial describing usage of axisartist at | |
| 13 | 13 | :ref:`axisartist_users-guide-index`. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -18,8 +18,8 @@ mplot3d | |||
| 18 | 18 | ======= | |
| 19 | 19 | ||
| 20 | 20 | :mod:`mpl_toolkits.mplot3d` provides some basic 3D | |
| 21 | - plotting (scatter, surf, line, mesh) tools. Not the fastest or feature | ||
| 22 | - complete 3D library out there, but ships with Matplotlib and thus may be a | ||
| 21 | + plotting (scatter, surf, line, mesh) tools. Not the fastest or most feature | ||
| 22 | + complete 3D library out there, but it ships with Matplotlib and thus may be a | ||
| 23 | 23 | lighter weight solution for some use cases. Check out the | |
| 24 | 24 | :ref:`mplot3d tutorial <sphx_glr_tutorials_toolkits_mplot3d.py>` for more | |
| 25 | 25 | information. | |
@@ -47,7 +47,7 @@ axes_grid1 | |||
| 47 | 47 | ========== | |
| 48 | 48 | ||
| 49 | 49 | The :mod:`mpl_toolkits.axes_grid1` toolkit is a | |
| 50 | - collection of helper classes to ease displaying multiple axes in Matplotlib. | ||
| 50 | + collection of helper classes for displaying multiple axes in Matplotlib. | ||
| 51 | 51 | ||
| 52 | 52 | .. image:: /_static/demo_axes_grid.png | |
| 53 | 53 | ||
@@ -63,7 +63,7 @@ axisartist | |||
| 63 | 63 | ========== | |
| 64 | 64 | ||
| 65 | 65 | The :mod:`mpl_toolkits.axisartist` toolkit contains | |
| 66 | - a custom Axes class that is meant to support for curvilinear grids. | ||
| 66 | + a custom Axes class that is meant to support curvilinear grids. | ||
| 67 | 67 | ||
| 68 | 68 | .. toctree:: | |
| 69 | 69 | :maxdepth: 2 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,10 +1,9 @@ | |||
| 1 | 1 | """ | |
| 2 | 2 | Axislines includes modified implementation of the Axes class. The | |
| 3 | - biggest difference is that the artists responsible to draw axis line, | ||
| 4 | - ticks, ticklabel and axis labels are separated out from the mpl's Axis | ||
| 5 | - class, which are much more than artists in the original | ||
| 6 | - mpl. Originally, this change was motivated to support curvilinear | ||
| 7 | - grid. Here are a few reasons that I came up with new axes class. | ||
| 3 | + biggest difference is that the artists responsible for drawing the axis spine, | ||
| 4 | + ticks, ticklabels and axis labels are separated out from mpl's Axis | ||
| 5 | + class. Originally, this change was motivated to support curvilinear | ||
| 6 | + grid. Here are a few reasons that I came up with a new axes class: | ||
| 8 | 7 | ||
| 9 | 8 | ||
| 10 | 9 | * "top" and "bottom" x-axis (or "left" and "right" y-axis) can have | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,7 +14,7 @@ | |||
| 14 | 14 | (multiple) images with matplotlib. In matplotlib, the axes location | |
| 15 | 15 | (and size) is specified in the normalized figure coordinates, which | |
| 16 | 16 | may not be ideal for displaying images that needs to have a given | |
| 17 | - aspect ratio. For example, it helps you to have a colorbar whose | ||
| 17 | + aspect ratio. For example, it helps if you have a colorbar whose | ||
| 18 | 18 | height always matches that of the image. `ImageGrid`_, `RGB Axes`_ and | |
| 19 | 19 | `AxesDivider`_ are helper classes that deals with adjusting the | |
| 20 | 20 | location of (multiple) Axes. They provides a framework to adjust the | |
@@ -276,7 +276,7 @@ | |||
| 276 | 276 | Example 2. twin | |
| 277 | 277 | ~~~~~~~~~~~~~~~ | |
| 278 | 278 | ||
| 279 | - *twin* without a transform argument treat the parasite axes to have a | ||
| 279 | + *twin* without a transform argument assumes that the parasite axes has the | ||
| 280 | 280 | same data transform as the host. This can be useful when you want the | |
| 281 | 281 | top(or right)-axis to have different tick-locations, tick-labels, or | |
| 282 | 282 | tick-formatter for bottom(or left)-axis. :: | |
@@ -407,23 +407,24 @@ | |||
| 407 | 407 | AxesDivider | |
| 408 | 408 | =========== | |
| 409 | 409 | ||
| 410 | - The axes_divider module provide helper classes to adjust the axes | ||
| 411 | - positions of set of images in the drawing time. | ||
| 410 | + The axes_divider module provides helper classes to adjust the axes | ||
| 411 | + positions of a set of images at drawing time. | ||
| 412 | 412 | ||
| 413 | - * :mod:`~mpl_toolkits.axes_grid1.axes_size` provides a classes of | ||
| 414 | - units that the size of each axes will be determined. For example, | ||
| 415 | - you can specify a fixed size | ||
| 413 | + * :mod:`~mpl_toolkits.axes_grid1.axes_size` provides a class of | ||
| 414 | + units that are used to determine the size of each axes. For example, | ||
| 415 | + you can specify a fixed size. | ||
| 416 | 416 | ||
| 417 | - * :class:`~mpl_toolkits.axes_grid1.axes_size.Divider` this is the class | ||
| 418 | - that is used calculates the axes position. It divides the given | ||
| 419 | - rectangular area into several areas. You initialize the divider by | ||
| 420 | - setting the horizontal and vertical list of sizes that the division | ||
| 421 | - will be based on. You then use the new_locator method, whose return | ||
| 422 | - value is a callable object that can be used to set the axes_locator | ||
| 423 | - of the axes. | ||
| 417 | + * :class:`~mpl_toolkits.axes_grid1.axes_size.Divider` is the class | ||
| 418 | + that calculates the axes position. It divides the given | ||
| 419 | + rectangular area into several areas. The divider is initialized by | ||
| 420 | + setting the lists of horizontal and vertical sizes on which the division | ||
| 421 | + will be based. Then use | ||
| 422 | + :meth:`~mpl_toolkits.axes_grid1.axes_size.Divider.new_locator`, | ||
| 423 | + which returns a callable object that can be used to set the | ||
| 424 | + axes_locator of the axes. | ||
| 424 | 425 | ||
| 425 | 426 | ||
| 426 | - You first initialize the divider by specifying its grids, i.e., | ||
| 427 | + First, initialize the divider by specifying its grids, i.e., | ||
| 427 | 428 | horizontal and vertical. | |
| 428 | 429 | ||
| 429 | 430 | for example,:: | |
@@ -454,37 +455,37 @@ | |||
| 454 | 455 | * v2 => 3, 0 | |
| 455 | 456 | ||
| 456 | 457 | The height of the bottom row is always 2 (axes_divider internally | |
| 457 | - assumes that the unit is inch). The first and the second rows with | ||
| 458 | - height ratio of 2:3. For example, if the total height of the grid 6, | ||
| 458 | + assumes that the unit is inches). The first and the second rows have a | ||
| 459 | + height ratio of 2:3. For example, if the total height of the grid is 6, | ||
| 459 | 460 | then the first and second row will each occupy 2/(2+3) and 3/(2+3) of | |
| 460 | - (6-1) inches. The widths of columns (horiz) will be similarly | ||
| 461 | - determined. When aspect ratio is set, the total height (or width) will | ||
| 461 | + (6-1) inches. The widths of the horizontal columns will be similarly | ||
| 462 | + determined. When the aspect ratio is set, the total height (or width) will | ||
| 462 | 463 | be adjusted accordingly. | |
| 463 | 464 | ||
| 464 | 465 | ||
| 465 | 466 | The :mod:`mpl_toolkits.axes_grid1.axes_size` contains several classes | |
| 466 | 467 | that can be used to set the horizontal and vertical configurations. For | |
| 467 | - example, for the vertical configuration above will be:: | ||
| 468 | + example, for vertical configuration one could use:: | ||
| 468 | 469 | ||
| 469 | 470 | from mpl_toolkits.axes_grid1.axes_size import Fixed, Scaled | |
| 470 | 471 | vert = [Fixed(2), Scaled(2), Scaled(3)] | |
| 471 | 472 | ||
| 472 | 473 | After you set up the divider object, then you create a locator | |
| 473 | - instance which will be given to the axes.:: | ||
| 474 | + instance that will be given to the axes object.:: | ||
| 474 | 475 | ||
| 475 | 476 | locator = divider.new_locator(nx=0, ny=1) | |
| 476 | 477 | ax.set_axes_locator(locator) | |
| 477 | 478 | ||
| 478 | - The return value of the new_locator method is a instance of the | ||
| 479 | + The return value of the new_locator method is an instance of the | ||
| 479 | 480 | AxesLocator class. It is a callable object that returns the | |
| 480 | 481 | location and size of the cell at the first column and the second row. | |
| 481 | 482 | You may create a locator that spans over multiple cells.:: | |
| 482 | 483 | ||
| 483 | 484 | locator = divider.new_locator(nx=0, nx=2, ny=1) | |
| 484 | 485 | ||
| 485 | 486 | The above locator, when called, will return the position and size of | |
| 486 | - the cells spanning the first and second column and the first row. You | ||
| 487 | - may consider it as [0:2, 1]. | ||
| 487 | + the cells spanning the first and second column and the first row. In | ||
| 488 | + this example, it will return [0:2, 1]. | ||
| 488 | 489 | ||
| 489 | 490 | See the example, | |
| 490 | 491 | ||
@@ -495,8 +496,8 @@ | |||
| 495 | 496 | ||
| 496 | 497 | Simple Axes Divider2 | |
| 497 | 498 | ||
| 498 | - You can adjust the size of the each axes according to their x or y | ||
| 499 | - data limits (AxesX and AxesY), similar to the axes aspect parameter. | ||
| 499 | + You can adjust the size of each axes according to its x or y | ||
| 500 | + data limits (AxesX and AxesY). | ||
| 500 | 501 | ||
| 501 | 502 | .. figure:: ../../gallery/axes_grid1/images/sphx_glr_simple_axes_divider3_001.png | |
| 502 | 503 | :target: ../../gallery/axes_grid1/simple_axes_divider3.html | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,11 +10,11 @@ | |||
| 10 | 10 | (derived from the mpl's original Axes class). | |
| 11 | 11 | As a side effect, some commands (mostly tick-related) do not work. | |
| 12 | 12 | ||
| 13 | - The *axisartist* contains custom Axes class that is meant to support for | ||
| 13 | + The *axisartist* contains a custom Axes class that is meant to support | ||
| 14 | 14 | curvilinear grids (e.g., the world coordinate system in astronomy). | |
| 15 | 15 | Unlike mpl's original Axes class which uses Axes.xaxis and Axes.yaxis | |
| 16 | - to draw ticks, ticklines and etc., Axes in axisartist uses special | ||
| 17 | - artist (AxisArtist) which can handle tick, ticklines and etc. for | ||
| 16 | + to draw ticks, ticklines, etc., axisartist uses a special | ||
| 17 | + artist (AxisArtist) that can handle ticks, ticklines, etc. for | ||
| 18 | 18 | curved coordinate systems. | |
| 19 | 19 | ||
| 20 | 20 | .. figure:: ../../gallery/axisartist/images/sphx_glr_demo_floating_axis_001.png | |
@@ -24,29 +24,29 @@ | |||
| 24 | 24 | ||
| 25 | 25 | Demo Floating Axis | |
| 26 | 26 | ||
| 27 | - Since it uses special artists, some mpl commands that work on | ||
| 27 | + Since it uses special artists, some Matplotlib commands that work on | ||
| 28 | 28 | Axes.xaxis and Axes.yaxis may not work. | |
| 29 | 29 | ||
| 30 | 30 | .. _axisartist_users-guide-index: | |
| 31 | 31 | ||
| 32 | 32 | axisartist | |
| 33 | 33 | ========== | |
| 34 | 34 | ||
| 35 | - *axisartist* module provides a custom (and very experimental) Axes | ||
| 36 | - class, where each axis (left, right, top and bottom) have a separate | ||
| 37 | - associated artist which is responsible to draw axis-line, ticks, | ||
| 38 | - ticklabels, label. Also, you can create your own axis, which can pass | ||
| 35 | + The *axisartist* module provides a custom (and very experimental) Axes | ||
| 36 | + class, where each axis (left, right, top, and bottom) have a separate | ||
| 37 | + associated artist which is responsible for drawing the axis-line, ticks, | ||
| 38 | + ticklabels, and labels. You can also create your own axis, which can pass | ||
| 39 | 39 | through a fixed position in the axes coordinate, or a fixed position | |
| 40 | 40 | in the data coordinate (i.e., the axis floats around when viewlimit | |
| 41 | 41 | changes). | |
| 42 | 42 | ||
| 43 | 43 | The axes class, by default, has its xaxis and yaxis invisible, and | |
| 44 | - has 4 additional artists which are responsible for drawing the 4 axis sides in | ||
| 45 | - "left","right","bottom" and "top". They are accessed as | ||
| 44 | + has 4 additional artists which are responsible for drawing the 4 axis spines in | ||
| 45 | + "left", "right", "bottom", and "top". They are accessed as | ||
| 46 | 46 | ax.axis["left"], ax.axis["right"], and so on, i.e., ax.axis is a | |
| 47 | 47 | dictionary that contains artists (note that ax.axis is still a | |
| 48 | - callable methods and it behaves as an original Axes.axis method in | ||
| 49 | - mpl). | ||
| 48 | + callable method and it behaves as an original Axes.axis method in | ||
| 49 | + Matplotlib). | ||
| 50 | 50 | ||
| 51 | 51 | To create an axes, :: | |
| 52 | 52 | ||
@@ -60,7 +60,7 @@ | |||
| 60 | 60 | ax = AA.Subplot(fig, 111) | |
| 61 | 61 | fig.add_subplot(ax) | |
| 62 | 62 | ||
| 63 | - For example, you can hide the right, and top axis by :: | ||
| 63 | + For example, you can hide the right and top spines using:: | ||
| 64 | 64 | ||
| 65 | 65 | ax.axis["right"].set_visible(False) | |
| 66 | 66 | ax.axis["top"].set_visible(False) | |
@@ -74,7 +74,7 @@ | |||
| 74 | 74 | Simple Axisline3 | |
| 75 | 75 | ||
| 76 | 76 | ||
| 77 | - It is also possible to add an extra axis. For example, you may have an | ||
| 77 | + It is also possible to add a horizontal axis. For example, you may have an | ||
| 78 | 78 | horizontal axis at y=0 (in data coordinate). :: | |
| 79 | 79 | ||
| 80 | 80 | ax.axis["y=0"] = ax.new_floating_axis(nth_coord=0, value=0) | |
@@ -98,8 +98,8 @@ | |||
| 98 | 98 | axisartist with ParasiteAxes | |
| 99 | 99 | ---------------------------- | |
| 100 | 100 | ||
| 101 | - Most commands in the axes_grid1 toolkit can take a axes_class keyword | ||
| 102 | - argument, and the commands creates an axes of the given class. For example, | ||
| 101 | + Most commands in the axes_grid1 toolkit can take an axes_class keyword | ||
| 102 | + argument, and the commands create an axes of the given class. For example, | ||
| 103 | 103 | to create a host subplot with axisartist.Axes, :: | |
| 104 | 104 | ||
| 105 | 105 | import mpl_toolkits.axisartist as AA | |
@@ -108,7 +108,7 @@ | |||
| 108 | 108 | host = host_subplot(111, axes_class=AA.Axes) | |
| 109 | 109 | ||
| 110 | 110 | ||
| 111 | - Here is an example that uses parasiteAxes. | ||
| 111 | + Here is an example that uses parasiteAxes. | ||
| 112 | 112 | ||
| 113 | 113 | ||
| 114 | 114 | .. figure:: ../../gallery/axisartist/images/sphx_glr_demo_parasite_axes2_001.png | |
@@ -123,7 +123,7 @@ | |||
| 123 | 123 | Curvilinear Grid | |
| 124 | 124 | ---------------- | |
| 125 | 125 | ||
| 126 | - The motivation behind the AxisArtist module is to support curvilinear grid | ||
| 126 | + The motivation behind the AxisArtist module is to support a curvilinear grid | ||
| 127 | 127 | and ticks. | |
| 128 | 128 | ||
| 129 | 129 | .. figure:: ../../gallery/axisartist/images/sphx_glr_demo_curvelinear_grid_001.png | |
@@ -137,7 +137,7 @@ | |||
| 137 | 137 | Floating Axes | |
| 138 | 138 | ------------- | |
| 139 | 139 | ||
| 140 | - This also support a Floating Axes whose outer axis are defined as | ||
| 140 | + AxisArtist also supports a Floating Axes whose outer axes are defined as | ||
| 141 | 141 | floating axis. | |
| 142 | 142 | ||
| 143 | 143 | .. figure:: ../../gallery/axisartist/images/sphx_glr_demo_floating_axes_001.png | |
| Back | FazBrowse Home | New Git URL |
0 commit comments