From 274af80014998e90c0be51f35e862332759c321f Mon Sep 17 00:00:00 2001 From: Yuval Langer Date: Sat, 1 Nov 2014 18:25:32 +0200 Subject: [PATCH 1/4] `eg,` to `e.g.,` Used: ```bash find * -type f -exec sed -i 's/\beg,/e.g.,/g' {} \; ``` --- doc/api/api_changes.rst | 2 +- doc/devel/documenting_mpl.rst | 2 +- doc/faq/troubleshooting_faq.rst | 2 +- doc/users/mathtext.rst | 2 +- doc/users/pyplot_tutorial.rst | 2 +- doc/users/shell.rst | 2 +- doc/users/text_props.rst | 2 +- examples/misc/rc_traits.py | 2 +- lib/matplotlib/__init__.py | 2 +- lib/matplotlib/axes/_base.py | 2 +- lib/matplotlib/axis.py | 2 +- lib/matplotlib/backend_bases.py | 14 +++++++------- lib/matplotlib/backends/backend_template.py | 4 ++-- lib/matplotlib/backends/backend_wx.py | 2 +- lib/matplotlib/text.py | 2 +- src/_image.cpp | 4 ++-- src/ft2font.cpp | 2 +- 17 files changed, 25 insertions(+), 25 deletions(-) diff --git a/doc/api/api_changes.rst b/doc/api/api_changes.rst index a79b57124180..bae2214f3a63 100644 --- a/doc/api/api_changes.rst +++ b/doc/api/api_changes.rst @@ -1810,7 +1810,7 @@ Changes for 0.65.1 removed add_axes and add_subplot from backend_bases. Use figure.add_axes and add_subplot instead. The figure now manages the current axes with gca and sca for get and set current axes. If you - have code you are porting which called, eg, figmanager.add_axes, you + have code you are porting which called, e.g., figmanager.add_axes, you can now simply do figmanager.canvas.figure.add_axes. Changes for 0.65 diff --git a/doc/devel/documenting_mpl.rst b/doc/devel/documenting_mpl.rst index 27309e4b4e2c..2c290385c310 100644 --- a/doc/devel/documenting_mpl.rst +++ b/doc/devel/documenting_mpl.rst @@ -362,7 +362,7 @@ Referring to mpl documents In the documentation, you may want to include to a document in the matplotlib src, e.g., a license file or an image file from `mpl-data`, refer to it via a relative path from the document where the rst file -resides, eg, in :file:`users/navigation_toolbar.rst`, we refer to the +resides, e.g., in :file:`users/navigation_toolbar.rst`, we refer to the image icons with:: .. image:: ../../lib/matplotlib/mpl-data/images/subplots.png diff --git a/doc/faq/troubleshooting_faq.rst b/doc/faq/troubleshooting_faq.rst index f970012482f3..5c3f6f299581 100644 --- a/doc/faq/troubleshooting_faq.rst +++ b/doc/faq/troubleshooting_faq.rst @@ -125,7 +125,7 @@ If you compiled matplotlib yourself, please also provide platform that are useful for the matplotlib developers to diagnose your problem. - * your compiler version -- eg, ``gcc --version`` + * your compiler version -- e.g., ``gcc --version`` Including this information in your first e-mail to the mailing list will save a lot of time. diff --git a/doc/users/mathtext.rst b/doc/users/mathtext.rst index 833e86455fef..35ffdef61786 100644 --- a/doc/users/mathtext.rst +++ b/doc/users/mathtext.rst @@ -161,7 +161,7 @@ The default font is *italics* for mathematical symbols. This is useful, for example, to use the same font as regular non-math text for math text, by setting it to ``regular``. -To change fonts, eg, to write "sin" in a Roman font, enclose the text +To change fonts, e.g., to write "sin" in a Roman font, enclose the text in a font command:: r'$s(t) = \mathcal{A}\mathrm{sin}(2 \omega t)$' diff --git a/doc/users/pyplot_tutorial.rst b/doc/users/pyplot_tutorial.rst index 2778697ea948..19ec5b99d658 100644 --- a/doc/users/pyplot_tutorial.rst +++ b/doc/users/pyplot_tutorial.rst @@ -7,7 +7,7 @@ Pyplot tutorial :mod:`matplotlib.pyplot` is a collection of command style functions that make matplotlib work like MATLAB. Each ``pyplot`` function makes -some change to a figure: eg, create a figure, create a plotting area +some change to a figure: e.g., create a figure, create a plotting area in a figure, plot some lines in a plotting area, decorate the plot with labels, etc.... :mod:`matplotlib.pyplot` is stateful, in that it keeps track of the current figure and plotting area, and the plotting diff --git a/doc/users/shell.rst b/doc/users/shell.rst index 20c465895fe6..2b10b20cbfc8 100644 --- a/doc/users/shell.rst +++ b/doc/users/shell.rst @@ -10,7 +10,7 @@ to update the plot every time a single property is changed, only once after all the properties have changed. But when working from the python shell, you usually do want to update -the plot with every command, eg, after changing the +the plot with every command, e.g., after changing the :func:`~matplotlib.pyplot.xlabel`, or the marker style of a line. While this is simple in concept, in practice it can be tricky, because matplotlib is a graphical user interface application under the hood, diff --git a/doc/users/text_props.rst b/doc/users/text_props.rst index 58d19d7d84cd..3ff91a0a0e7c 100644 --- a/doc/users/text_props.rst +++ b/doc/users/text_props.rst @@ -24,7 +24,7 @@ horizontalalignment or ha [ ``'center'`` | ``'right'`` | ``'left'`` ] label any string linespacing float multialignment [``'left'`` | ``'right'`` | ``'center'`` ] -name or fontname string eg, [``'Sans'`` | ``'Courier'`` | ``'Helvetica'`` ...] +name or fontname string e.g., [``'Sans'`` | ``'Courier'`` | ``'Helvetica'`` ...] picker [None|float|boolean|callable] position (x,y) rotation [ angle in degrees ``'vertical'`` | ``'horizontal'`` diff --git a/examples/misc/rc_traits.py b/examples/misc/rc_traits.py index ee74f750f8b5..69a4109d02b0 100644 --- a/examples/misc/rc_traits.py +++ b/examples/misc/rc_traits.py @@ -33,7 +33,7 @@ } def hex2color(s): - "Convert hex string (like html uses, eg, #efefef) to a r,g,b tuple" + "Convert hex string (like html uses, e.g., #efefef) to a r,g,b tuple" return tuple([int(n, 16)/255.0 for n in (s[1:3], s[3:5], s[5:7])]) class RGBA(traits.HasTraits): diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py index 306d78ea4371..b0c4c41b4c20 100644 --- a/lib/matplotlib/__init__.py +++ b/lib/matplotlib/__init__.py @@ -1334,7 +1334,7 @@ def interactive(b): """ Set interactive mode to boolean b. - If b is True, then draw after every plotting command, eg, after xlabel + If b is True, then draw after every plotting command, e.g., after xlabel """ rcParams['interactive'] = b diff --git a/lib/matplotlib/axes/_base.py b/lib/matplotlib/axes/_base.py index 9d93e22e0641..cc95908a6d0d 100644 --- a/lib/matplotlib/axes/_base.py +++ b/lib/matplotlib/axes/_base.py @@ -1899,7 +1899,7 @@ def autoscale(self, enable=True, axis='both', tight=None): def autoscale_view(self, tight=None, scalex=True, scaley=True): """ Autoscale the view limits using the data limits. You can - selectively autoscale only a single axis, eg, the xaxis by + selectively autoscale only a single axis, e.g., the xaxis by setting *scaley* to *False*. The autoscaling preserves any axis direction reversal that has already been done. diff --git a/lib/matplotlib/axis.py b/lib/matplotlib/axis.py index 2c8e0bd2d868..364c34f6994b 100644 --- a/lib/matplotlib/axis.py +++ b/lib/matplotlib/axis.py @@ -1347,7 +1347,7 @@ def grid(self, b=None, which='major', **kwargs): *kwargs* are supplied, it is assumed you want the grid on and *b* will be set to True. - *kwargs* are used to set the line properties of the grids, eg, + *kwargs* are used to set the line properties of the grids, e.g., xax.grid(color='r', linestyle='-', linewidth=2) """ diff --git a/lib/matplotlib/backend_bases.py b/lib/matplotlib/backend_bases.py index a029307fc08d..cb1607cfccff 100644 --- a/lib/matplotlib/backend_bases.py +++ b/lib/matplotlib/backend_bases.py @@ -717,7 +717,7 @@ def points_to_pixels(self, points): return points converted to pixels You need to override this function (unless your backend - doesn't have a dpi, eg, postscript or svg). Some imaging + doesn't have a dpi, e.g., postscript or svg). Some imaging systems assume some value for pixels per inch:: points to pixels = points * pixels_per_inch/72.0 * dpi/72.0 @@ -2233,7 +2233,7 @@ def get_default_filetype(cls): def get_window_title(self): """ Get the title text of the window containing the figure. - Return None if there is no window (eg, a PS backend). + Return None if there is no window (e.g., a PS backend). """ if hasattr(self, "manager"): return self.manager.get_window_title() @@ -2241,7 +2241,7 @@ def get_window_title(self): def set_window_title(self, title): """ Set the title text of the window containing the figure. Note that - this has no effect if there is no window (eg, a PS backend). + this has no effect if there is no window (e.g., a PS backend). """ if hasattr(self, "manager"): self.manager.set_window_title(title) @@ -2259,9 +2259,9 @@ def switch_backends(self, FigureCanvasClass): """ Instantiate an instance of FigureCanvasClass - This is used for backend switching, eg, to instantiate a + This is used for backend switching, e.g., to instantiate a FigureCanvasPS from a FigureCanvasGTK. Note, deep copying is - not done, so any changes to one of the instances (eg, setting + not done, so any changes to one of the instances (e.g., setting figure size or line props), will be reflected in the other """ newCanvas = FigureCanvasClass(self.figure) @@ -2600,14 +2600,14 @@ def show_popup(self, msg): def get_window_title(self): """ Get the title text of the window containing the figure. - Return None for non-GUI backends (eg, a PS backend). + Return None for non-GUI backends (e.g., a PS backend). """ return 'image' def set_window_title(self, title): """ Set the title text of the window containing the figure. Note that - this has no effect for non-GUI backends (eg, a PS backend). + this has no effect for non-GUI backends (e.g., a PS backend). """ pass diff --git a/lib/matplotlib/backends/backend_template.py b/lib/matplotlib/backends/backend_template.py index a26679d0e0ab..bce2013212c5 100644 --- a/lib/matplotlib/backends/backend_template.py +++ b/lib/matplotlib/backends/backend_template.py @@ -131,7 +131,7 @@ def new_gc(self): return GraphicsContextTemplate() def points_to_pixels(self, points): - # if backend doesn't have dpi, eg, postscript or svg + # if backend doesn't have dpi, e.g., postscript or svg return points # elif backend assumes a value for pixels_per_inch #return points/72.0 * self.dpi.get() * pixels_per_inch/72.0 @@ -156,7 +156,7 @@ class GraphicsContextTemplate(GraphicsContextBase): methods. The base GraphicsContext stores colors as a RGB tuple on the unit - interval, eg, (0.5, 0.0, 1.0). You may need to map this to colors + interval, e.g., (0.5, 0.0, 1.0). You may need to map this to colors appropriate for your backend. """ pass diff --git a/lib/matplotlib/backends/backend_wx.py b/lib/matplotlib/backends/backend_wx.py index d99f04f07ea9..626d632d891c 100644 --- a/lib/matplotlib/backends/backend_wx.py +++ b/lib/matplotlib/backends/backend_wx.py @@ -466,7 +466,7 @@ class GraphicsContextWx(GraphicsContextBase): bitmap object that is passed in. The base GraphicsContext stores colors as a RGB tuple on the unit - interval, eg, (0.5, 0.0, 1.0). wxPython uses an int interval, but + interval, e.g., (0.5, 0.0, 1.0). wxPython uses an int interval, but since wxPython colour management is rather simple, I have not chosen to implement a separate colour manager class. """ diff --git a/lib/matplotlib/text.py b/lib/matplotlib/text.py index 4b219bf6fab6..1f7b8e845350 100644 --- a/lib/matplotlib/text.py +++ b/lib/matplotlib/text.py @@ -83,7 +83,7 @@ def get_rotation(rotation): linespacing float lod [True | False] multialignment ['left' | 'right' | 'center' ] - name or fontname string eg, + name or fontname string e.g., ['Sans' | 'Courier' | 'Helvetica' ...] position (x,y) rotation [ angle in degrees 'vertical' | 'horizontal' diff --git a/src/_image.cpp b/src/_image.cpp index 73f2624c772c..fadf2e43cb22 100644 --- a/src/_image.cpp +++ b/src/_image.cpp @@ -685,7 +685,7 @@ char Image::set_interpolation__doc__[] = "set_interpolation(scheme)\n" "\n" "Set the interpolation scheme to one of the module constants, " - "eg, image.NEAREST, image.BILINEAR, etc..." + "e.g., image.NEAREST, image.BILINEAR, etc..." ; Py::Object @@ -721,7 +721,7 @@ char Image::set_aspect__doc__[] = "set_aspect(scheme)\n" "\n" "Set the aspect ration to one of the image module constant." - "eg, one of image.ASPECT_PRESERVE, image.ASPECT_FREE" + "e.g., one of image.ASPECT_PRESERVE, image.ASPECT_FREE" ; Py::Object Image::set_aspect(const Py::Tuple& args) diff --git a/src/ft2font.cpp b/src/ft2font.cpp index 7f33d6798f26..c0756f2fce5f 100644 --- a/src/ft2font.cpp +++ b/src/ft2font.cpp @@ -1587,7 +1587,7 @@ char FT2Font::draw_glyph_to_bitmap__doc__[] = "\n" "If you want automatic layout, use set_text in combinations with\n" "draw_glyphs_to_bitmap. This function is intended for people who\n" - "want to render individual glyphs at precise locations, eg, a\n" + "want to render individual glyphs at precise locations, e.g., a\n" "a glyph returned by load_char\n"; Py::Object From ef80b703f8b78bdd5ff30ad23874c92db91b607f Mon Sep 17 00:00:00 2001 From: Yuval Langer Date: Sat, 1 Nov 2014 18:40:33 +0200 Subject: [PATCH 2/4] `eg` (without a comma) to `e.g.,` Used: ```bash find * -type f -exec sed -i 's/\beg\b/e.g.,/g' {} \; ``` --- doc/README.txt | 2 +- doc/api/api_changes.rst | 12 ++++++------ doc/devel/documenting_mpl.rst | 6 +++--- doc/devel/license.rst | 2 +- doc/devel/release_guide.rst | 2 +- doc/faq/howto_faq.rst | 14 +++++++------- doc/faq/installing_faq.rst | 2 +- doc/faq/usage_faq.rst | 2 +- doc/users/artists.rst | 2 +- doc/users/event_handling.rst | 8 ++++---- doc/users/license.rst | 2 +- doc/users/path_tutorial.rst | 4 ++-- doc/users/pyplot_tutorial.rst | 2 +- doc/users/recipes.rst | 8 ++++---- doc/users/text_intro.rst | 2 +- doc/users/text_props.rst | 4 ++-- doc/users/transforms_tutorial.rst | 2 +- doc/users/whats_new.rst | 2 +- examples/README.txt | 4 ++-- examples/api/date_index_formatter.py | 2 +- examples/api/font_family_rc.py | 4 ++-- examples/pylab_examples/accented_text.py | 4 ++-- examples/pylab_examples/annotation_demo.py | 2 +- examples/pylab_examples/customize_rc.py | 4 ++-- examples/pylab_examples/date_index_formatter.py | 2 +- examples/pylab_examples/major_minor_demo1.py | 2 +- examples/pylab_examples/set_and_get.py | 2 +- examples/pylab_examples/shared_axis_demo.py | 10 +++++----- examples/pylab_examples/toggle_images.py | 2 +- examples/tests/backend_driver.py | 2 +- lib/matplotlib/__init__.py | 4 ++-- lib/matplotlib/axes/_axes.py | 2 +- lib/matplotlib/axes/_base.py | 6 +++--- lib/matplotlib/axes/_subplots.py | 2 +- lib/matplotlib/backend_bases.py | 2 +- lib/matplotlib/backends/backend_template.py | 4 ++-- lib/matplotlib/collections.py | 4 ++-- lib/matplotlib/contour.py | 4 ++-- lib/matplotlib/dates.py | 8 ++++---- lib/matplotlib/figure.py | 6 +++--- lib/matplotlib/finance.py | 6 +++--- lib/matplotlib/gridspec.py | 4 ++-- lib/matplotlib/image.py | 2 +- lib/matplotlib/lines.py | 2 +- lib/matplotlib/mathtext.py | 8 ++++---- lib/matplotlib/mlab.py | 10 +++++----- lib/matplotlib/mpl-data/stylelib/ggplot.mplstyle | 2 +- lib/matplotlib/pyplot.py | 2 +- lib/matplotlib/text.py | 8 ++++---- lib/matplotlib/ticker.py | 6 +++--- lib/matplotlib/tri/tricontour.py | 2 +- lib/matplotlib/units.py | 4 ++-- lib/mpl_toolkits/axes_grid1/axes_divider.py | 2 +- matplotlibrc.template | 6 +++--- 54 files changed, 112 insertions(+), 112 deletions(-) diff --git a/doc/README.txt b/doc/README.txt index 9ae05cb477bc..51c4b9093edd 100644 --- a/doc/README.txt +++ b/doc/README.txt @@ -6,7 +6,7 @@ documentation. All of the documentation is written using sphinx, a python documentation system built on top of ReST. This directory contains -* users - the user documentation, eg plotting tutorials, configuration +* users - the user documentation, e.g., plotting tutorials, configuration tips, etc. * devel - documentation for matplotlib developers diff --git a/doc/api/api_changes.rst b/doc/api/api_changes.rst index bae2214f3a63..139214578421 100644 --- a/doc/api/api_changes.rst +++ b/doc/api/api_changes.rst @@ -1305,7 +1305,7 @@ Changes for 0.90.1 units.ConversionInterface.tickers renamed to units.ConversionInterface.axisinfo and it now returns a units.AxisInfo object rather than a tuple. This will make it - easier to add axis info functionality (eg I added a default label + easier to add axis info functionality (e.g., I added a default label on this iteration) w/o having to change the tuple length and hence the API of the client code every time new functionality is added. Also, units.ConversionInterface.convert_to_value is now simply @@ -1790,7 +1790,7 @@ Changes for 0.71 pylab still imports most of the symbols from Numerix, MLab, fft, etc, but is more cautious. For names that clash with python names (min, max, sum), pylab keeps the builtins and provides the numeric - versions with an a* prefix, eg (amin, amax, asum) + versions with an a* prefix, e.g., (amin, amax, asum) Changes for 0.70 ================ @@ -1937,7 +1937,7 @@ pcolor_classic and scatter_classic. The return value from pcolor is a PolyCollection. Most of the propertes that are available on rectangles or other patches are also -available on PolyCollections, eg you can say:: +available on PolyCollections, e.g., you can say:: c = scatter(blah, blah) c.set_linewidth(1.0) @@ -1955,7 +1955,7 @@ over the return value of scatter or pcolor to set properties for the entire list. If you want the different elements of a collection to vary on a -property, eg to have different line widths, see matplotlib.collections +property, e.g., to have different line widths, see matplotlib.collections for a discussion on how to set the properties as a sequence. For scatter, the size argument is now in points^2 (the area of the @@ -2215,7 +2215,7 @@ Changes for 0.42 needed with double buffered drawing. Ditto with state change. Text instances have a get_prop_tup method that returns a hashable tuple of text properties which you can use to see if text props - have changed, eg by caching a font or layout instance in a dict + have changed, e.g., by caching a font or layout instance in a dict with the prop tup as a key -- see RendererGTK.get_pango_layout in backend_gtk for an example. @@ -2236,7 +2236,7 @@ Changes for 0.42 * matplotlib.matlab._get_current_fig_manager renamed to matplotlib.matlab.get_current_fig_manager to allow user access to - the GUI window attribute, eg figManager.window for GTK and + the GUI window attribute, e.g., figManager.window for GTK and figManager.frame for wx Changes for 0.40 diff --git a/doc/devel/documenting_mpl.rst b/doc/devel/documenting_mpl.rst index 2c290385c310..758d49c462f0 100644 --- a/doc/devel/documenting_mpl.rst +++ b/doc/devel/documenting_mpl.rst @@ -392,7 +392,7 @@ So we can include plots from the examples dir using the symlink:: We used to use a symlink for :file:`mpl-data` too, but the distro -becomes very large on platforms that do not support links (eg the font +becomes very large on platforms that do not support links (e.g., the font files are duplicated and large) .. _internal-section-refs: @@ -401,7 +401,7 @@ Internal section references =========================== To maximize internal consistency in section labeling and references, -use hyphen separated, descriptive labels for section references, eg:: +use hyphen separated, descriptive labels for section references, e.g.,:: .. _howto-webapp: @@ -429,7 +429,7 @@ Section names, etc ================== For everything but top level chapters, please use ``Upper lower`` for -section titles, eg ``Possible hangups`` rather than ``Possible +section titles, e.g., ``Possible hangups`` rather than ``Possible Hangups`` Inheritance diagrams diff --git a/doc/devel/license.rst b/doc/devel/license.rst index aea9d7c4f4b7..1354f7b82117 100644 --- a/doc/devel/license.rst +++ b/doc/devel/license.rst @@ -14,7 +14,7 @@ distributing L/GPL code through an separate channel, possibly a toolkit. If you include code, make sure you include a copy of that code's license in the license directory if the code's license requires you to distribute the license with it. Non-BSD compatible licenses -are acceptable in matplotlib toolkits (eg basemap), but make sure you +are acceptable in matplotlib toolkits (e.g., basemap), but make sure you clearly state the licenses you are using. Why BSD compatible? diff --git a/doc/devel/release_guide.rst b/doc/devel/release_guide.rst index 88e0fc44dd5f..458b33ab8a6b 100644 --- a/doc/devel/release_guide.rst +++ b/doc/devel/release_guide.rst @@ -19,7 +19,7 @@ Testing * Run :file:`unit/memleak_hawaii3.py` and make sure there are no memory leaks -* try some GUI examples, eg :file:`simple_plot.py` with GTKAgg, TkAgg, etc... +* try some GUI examples, e.g., :file:`simple_plot.py` with GTKAgg, TkAgg, etc... * remove font cache and tex cache from :file:`.matplotlib` and test with and without cache on some example script diff --git a/doc/faq/howto_faq.rst b/doc/faq/howto_faq.rst index c845b1fcdfcc..4015dec0f4a9 100644 --- a/doc/faq/howto_faq.rst +++ b/doc/faq/howto_faq.rst @@ -22,7 +22,7 @@ Find all objects in a figure of a certain type Every matplotlib artist (see :ref:`artist-tutorial`) has a method called :meth:`~matplotlib.artist.Artist.findobj` that can be used to recursively search the artist for any artists it may contain that meet -some criteria (eg match all :class:`~matplotlib.lines.Line2D` +some criteria (e.g., match all :class:`~matplotlib.lines.Line2D` instances or match some arbitrary filter function). For example, the following snippet finds every object in the figure which has a `set_color` property and makes the object blue:: @@ -63,7 +63,7 @@ The :meth:`~matplotlib.pyplot.savefig` command has a keyword argument backgrounds transparent when saving, but will not affect the displayed image on the screen. -If you need finer grained control, eg you do not want full transparency +If you need finer grained control, e.g., you do not want full transparency or you want to affect the screen displayed version as well, you can set the alpha properties directly. The figure has a :class:`~matplotlib.patches.Rectangle` instance called *patch* @@ -194,7 +194,7 @@ this chicken and egg problem is to wait until the figure is draw by connecting (:meth:`~matplotlib.backend_bases.FigureCanvasBase.mpl_connect`) to the "on_draw" signal (:class:`~matplotlib.backend_bases.DrawEvent`) and -get the window extent there, and then do something with it, eg move +get the window extent there, and then do something with it, e.g., move the left of the canvas over; see :ref:`event-handling-tutorial`. Here is an example that gets a bounding box in relative figure coordinates @@ -252,10 +252,10 @@ setting in the right subplots. Skip dates where there is no data --------------------------------- -When plotting time series, eg financial time series, one often wants -to leave out days on which there is no data, eg weekends. By passing +When plotting time series, e.g., financial time series, one often wants +to leave out days on which there is no data, e.g., weekends. By passing in dates on the x-xaxis, you get large horizontal gaps on periods when -there is not data. The solution is to pass in some proxy x-data, eg +there is not data. The solution is to pass in some proxy x-data, e.g., evenly sampled indices, and then use a custom formatter to format these as dates. The example below shows how to use an 'index formatter' to achieve the desired plot:: @@ -559,7 +559,7 @@ at the end of the page in the sidebar (or `here The sphinx website is a good resource for learning sphinx, but we have put together a cheat-sheet at :ref:`documenting-matplotlib` which shows you how to get started, and outlines the matplotlib conventions -and extensions, eg for including plots directly from external code in +and extensions, e.g., for including plots directly from external code in your documents. Once your documentation contributions are working (and hopefully diff --git a/doc/faq/installing_faq.rst b/doc/faq/installing_faq.rst index b18975982756..b6bdd906bf04 100644 --- a/doc/faq/installing_faq.rst +++ b/doc/faq/installing_faq.rst @@ -391,7 +391,7 @@ Standalone binary installers for Windows If you have already installed Python and numpy, you can use one of the matplotlib binary installers for windows -- you can get these from the `download `_ site. Chose the files with -an ``.exe`` extension that match your version of Python (eg ``py2.7`` if you +an ``.exe`` extension that match your version of Python (e.g., ``py2.7`` if you installed Python 2.7). If you haven't already installed Python, you can get the official version from the `Python web site `_. diff --git a/doc/faq/usage_faq.rst b/doc/faq/usage_faq.rst index 1dcd7f7b7cc9..1b25d8a0b537 100644 --- a/doc/faq/usage_faq.rst +++ b/doc/faq/usage_faq.rst @@ -336,7 +336,7 @@ from the canvas (the place where the drawing goes). The canonical renderer for user interfaces is ``Agg`` which uses the `Anti-Grain Geometry`_ C++ library to make a raster (pixel) image of the figure. All of the user interfaces except ``macosx`` can be used with -agg rendering, eg +agg rendering, e.g., ``WXAgg``, ``GTKAgg``, ``QT4Agg``, ``TkAgg``. In addition, some of the user interfaces support other rendering engines. For example, with GTK, you can also select GDK rendering (backend diff --git a/doc/users/artists.rst b/doc/users/artists.rst index cff65522de08..ab42616bf871 100644 --- a/doc/users/artists.rst +++ b/doc/users/artists.rst @@ -577,7 +577,7 @@ set_major_formatter) ====================== ========================================================= Accessor method Description ====================== ========================================================= -get_scale The scale of the axis, eg 'log' or 'linear' +get_scale The scale of the axis, e.g., 'log' or 'linear' get_view_interval The interval instance of the axis view limits get_data_interval The interval instance of the axis data limits get_gridlines A list of grid lines for the Axis diff --git a/doc/users/event_handling.rst b/doc/users/event_handling.rst index 452e159aa0d7..17a902e00e40 100644 --- a/doc/users/event_handling.rst +++ b/doc/users/event_handling.rst @@ -410,7 +410,7 @@ Object picking ============== You can enable picking by setting the ``picker`` property of an -:class:`~matplotlib.artist.Artist` (eg a matplotlib +:class:`~matplotlib.artist.Artist` (e.g., a matplotlib :class:`~matplotlib.lines.Line2D`, :class:`~matplotlib.text.Text`, :class:`~matplotlib.patches.Patch`, :class:`~matplotlib.patches.Polygon`, :class:`~matplotlib.patches.AxesImage`, etc...) @@ -429,7 +429,7 @@ There are a variety of meanings of the ``picker`` property: points and the the artist will fire off an event if its data is within epsilon of the mouse event. For some artists like lines and patch collections, the artist may provide additional data to - the pick event that is generated, eg the indices of the data + the pick event that is generated, e.g., the indices of the data within epsilon of the pick event. ``function`` @@ -457,7 +457,7 @@ your callback is always fired with two attributes: ``mouseevent`` the mouse event that generate the pick event. The mouse event in turn has attributes like ``x`` and ``y`` (the - coords in display space, eg pixels from left, bottom) and xdata, + coords in display space, e.g., pixels from left, bottom) and xdata, ydata (the coords in data space). Additionally, you can get information about which buttons were pressed, which keys were pressed, which :class:`~matplotlib.axes.Axes` the mouse is over, @@ -471,7 +471,7 @@ your callback is always fired with two attributes: Additionally, certain artists like :class:`~matplotlib.lines.Line2D` and :class:`~matplotlib.collections.PatchCollection` may attach additional meta data like the indices into the data that meet the -picker criteria (eg all the points in the line that are within the +picker criteria (e.g., all the points in the line that are within the specified epsilon tolerance) Simple picking example diff --git a/doc/users/license.rst b/doc/users/license.rst index c52290f26d85..65f9cc78708e 100644 --- a/doc/users/license.rst +++ b/doc/users/license.rst @@ -9,7 +9,7 @@ Matplotlib only uses BSD compatible code, and its license is based on the `PSF `_ license. See the Open Source Initiative `licenses page `_ for details on individual -licenses. Non-BSD compatible licenses (eg LGPL) are acceptable in +licenses. Non-BSD compatible licenses (e.g., LGPL) are acceptable in matplotlib toolkits. For a discussion of the motivations behind the licencing choice, see :ref:`license-discussion`. diff --git a/doc/users/path_tutorial.rst b/doc/users/path_tutorial.rst index d34d80d80a5a..4e1c1b708318 100644 --- a/doc/users/path_tutorial.rst +++ b/doc/users/path_tutorial.rst @@ -122,14 +122,14 @@ All of the simple patch primitives in matplotlib, Rectangle, Circle, Polygon, etc, are implemented with simple path. Plotting functions like :meth:`~matplotlib.axes.Axes.hist` and :meth:`~matplotlib.axes.Axes.bar`, which create a number of -primitives, eg a bunch of Rectangles, can usually be implemented more +primitives, e.g., a bunch of Rectangles, can usually be implemented more efficiently using a compound path. The reason ``bar`` creates a list of rectangles and not a compound path is largely historical: the :class:`~matplotlib.path.Path` code is comparatively new and ``bar`` predates it. While we could change it now, it would break old code, so here we will cover how to create compound paths, replacing the functionality in bar, in case you need to do so in your own code for -efficiency reasons, eg you are creating an animated bar plot. +efficiency reasons, e.g., you are creating an animated bar plot. We will make the histogram chart by creating a series of rectangles for each histogram bar: the rectangle width is the bin width and the diff --git a/doc/users/pyplot_tutorial.rst b/doc/users/pyplot_tutorial.rst index 19ec5b99d658..22d9800a625c 100644 --- a/doc/users/pyplot_tutorial.rst +++ b/doc/users/pyplot_tutorial.rst @@ -71,7 +71,7 @@ several ways to set line properties * Use the setter methods of the ``Line2D`` instance. ``plot`` returns a list - of lines; eg ``line1, line2 = plot(x1,y1,x2,y2)``. Below I have only + of lines; e.g., ``line1, line2 = plot(x1,y1,x2,y2)``. Below I have only one line so it is a list of length 1. I use tuple unpacking in the ``line, = plot(x, y, 'o')`` to get the first element of the list:: diff --git a/doc/users/recipes.rst b/doc/users/recipes.rst index a92618fb7d0d..3ba3db73457a 100644 --- a/doc/users/recipes.rst +++ b/doc/users/recipes.rst @@ -12,7 +12,7 @@ figures and overcome some matplotlib warts. Sharing axis limits and views ============================= -It's common to make two or more plots which share an axis, eg two +It's common to make two or more plots which share an axis, e.g., two subplots with time as a common axis. When you pan and zoom around on one, you want the other to move around with you. To facilitate this, matplotlib Axes support a ``sharex`` and ``sharey`` attribute. When @@ -126,9 +126,9 @@ you will see that the x tick labels are all squashed together. Another annoyance is that if you hover the mouse over the window and look in the lower right corner of the matplotlib toolbar (:ref:`navigation-toolbar`) at the x and y coordinates, you see that -the x locations are formatted the same way the tick labels are, eg +the x locations are formatted the same way the tick labels are, e.g., "Dec 2004". What we'd like is for the location in the toolbar to have -a higher degree of precision, eg giving us the exact date out mouse is +a higher degree of precision, e.g., giving us the exact date out mouse is hovering over. To fix the first problem, we can use :func:`matplotlib.figure.Figure.autofmt_xdate` and to fix the second problem we can use the ``ax.fmt_xdata`` attribute which can be set to @@ -161,7 +161,7 @@ Fill Between and Alpha The :meth:`~matplotlib.axes.Axes.fill_between` function generates a shaded region between a min and max boundary that is useful for illustrating ranges. It has a very handy ``where`` argument to -combine filling with logical ranges, eg to just fill in a curve over +combine filling with logical ranges, e.g., to just fill in a curve over some threshold value. At its most basic level, ``fill_between`` can be use to enhance a diff --git a/doc/users/text_intro.rst b/doc/users/text_intro.rst index d4de28a33dce..022d51af8ea7 100644 --- a/doc/users/text_intro.rst +++ b/doc/users/text_intro.rst @@ -6,7 +6,7 @@ Text introduction matplotlib has excellent text support, including mathematical expressions, truetype support for raster and vector outputs, newline separated text with arbitrary rotations, and unicode support. Because -we embed the fonts directly in the output documents, eg for postscript +we embed the fonts directly in the output documents, e.g., for postscript or PDF, what you see on the screen is what you get in the hardcopy. `freetype2 `_ support produces very nice, antialiased fonts, that look good even at small diff --git a/doc/users/text_props.rst b/doc/users/text_props.rst index 3ff91a0a0e7c..1fa90efd7e30 100644 --- a/doc/users/text_props.rst +++ b/doc/users/text_props.rst @@ -5,7 +5,7 @@ Text properties and layout The :class:`matplotlib.text.Text` instances have a variety of properties which can be configured via keyword arguments to the text -commands (eg :func:`~matplotlib.pyplot.title`, +commands (e.g., :func:`~matplotlib.pyplot.title`, :func:`~matplotlib.pyplot.xlabel` and :func:`~matplotlib.pyplot.text`). ========================== ============================================================================== @@ -28,7 +28,7 @@ name or fontname string e.g., [``'Sans'`` | ``'Courier'`` | ``'Helvetica'`` picker [None|float|boolean|callable] position (x,y) rotation [ angle in degrees ``'vertical'`` | ``'horizontal'`` -size or fontsize [ size in points | relative size eg ``'smaller'``, ``'x-large'`` ] +size or fontsize [ size in points | relative size, e.g., ``'smaller'``, ``'x-large'`` ] style or fontstyle [ ``'normal'`` | ``'italic'`` | ``'oblique'``] text string or anything printable with '%s' conversion transform a matplotlib.transform transformation instance diff --git a/doc/users/transforms_tutorial.rst b/doc/users/transforms_tutorial.rst index 144bf3e45129..46c509dc6ad3 100644 --- a/doc/users/transforms_tutorial.rst +++ b/doc/users/transforms_tutorial.rst @@ -285,7 +285,7 @@ Using offset transforms to create a shadow effect ================================================= One use of transformations is to create a new transformation that is -offset from another transformation, eg to place one object shifted a +offset from another transformation, e.g., to place one object shifted a bit relative to another object. Typically you want the shift to be in some physical dimension, like points or inches rather than in data coordinates, so that the shift effect is constant at different zoom diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index 142ee6b38d84..d178f5a5aac4 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -1501,7 +1501,7 @@ Here are the 0.98.4 notes from the CHANGELOG:: Some of the changes Michael made to improve the output of the property tables in the rest docs broke of made difficult to use - some of the interactive doc helpers, eg setp and getp. Having all + some of the interactive doc helpers, e.g., setp and getp. Having all the rest markup in the ipython shell also confused the docstrings. I added a new rc param docstring.harcopy, to format the docstrings differently for hardcopy and other use. The ArtistInspector diff --git a/examples/README.txt b/examples/README.txt index 40a8e71aad9c..34ad3b71db09 100644 --- a/examples/README.txt +++ b/examples/README.txt @@ -8,7 +8,7 @@ Probably the most common way people use matplotlib is with the procedural interface, which follows the matlab/IDL/mathematica approach of using simple procedures like "plot" or "title" to modify the current figure. These examples are included in the "pylab_examples" -directory. If you want to write more robust scripts, eg for +directory. If you want to write more robust scripts, e.g., for production use or in a web application server, you will probably want to use the matplotlib API for full control. These examples are found in the "api" directory. Below is a brief description of the different @@ -41,7 +41,7 @@ directories found here: * units - working with unit data an custom types in matplotlib - * user_interfaces - using matplotlib in a GUI application, eg + * user_interfaces - using matplotlib in a GUI application, e.g., TkInter, WXPython, pygtk, pyqt or FLTK widgets * widgets - Examples using interactive widgets diff --git a/examples/api/date_index_formatter.py b/examples/api/date_index_formatter.py index 691e4a1e66fd..4e56a5a158b4 100644 --- a/examples/api/date_index_formatter.py +++ b/examples/api/date_index_formatter.py @@ -1,5 +1,5 @@ """ -When plotting time series, eg financial time series, one often wants +When plotting time series, e.g., financial time series, one often wants to leave out days on which there is no data, eh weekends. The example below shows how to use an 'index formatter' to achieve the desired plot """ diff --git a/examples/api/font_family_rc.py b/examples/api/font_family_rc.py index d3b2d4acca37..7222e1e6370e 100644 --- a/examples/api/font_family_rc.py +++ b/examples/api/font_family_rc.py @@ -1,10 +1,10 @@ """ You can explicitly set which font family is picked up for a given font -style (eg 'serif', 'sans-serif', or 'monospace'). +style (e.g., 'serif', 'sans-serif', or 'monospace'). In the example below, we only allow one font family (Tahoma) for the san-serif font style. You the default family with the font.family rc -param, eg:: +param, e.g.,:: rcParams['font.family'] = 'sans-serif' diff --git a/examples/pylab_examples/accented_text.py b/examples/pylab_examples/accented_text.py index 1482622f3890..20b8b6e0c762 100644 --- a/examples/pylab_examples/accented_text.py +++ b/examples/pylab_examples/accented_text.py @@ -4,8 +4,8 @@ The following accents are provided: \hat, \breve, \grave, \bar, \acute, \tilde, \vec, \dot, \ddot. All of them have the same syntax, -eg to make an overbar you do \bar{o} or to make an o umlaut you do -\ddot{o}. The shortcuts are also provided, eg: \"o \'e \`e \~n \.x +e.g., to make an overbar you do \bar{o} or to make an o umlaut you do +\ddot{o}. The shortcuts are also provided, e.g.,: \"o \'e \`e \~n \.x \^y """ diff --git a/examples/pylab_examples/annotation_demo.py b/examples/pylab_examples/annotation_demo.py index cc68a65f0085..d17f0af1de86 100644 --- a/examples/pylab_examples/annotation_demo.py +++ b/examples/pylab_examples/annotation_demo.py @@ -26,7 +26,7 @@ headwidth : the width of the base of the arrow head in points shrink : move the tip and base some percent away from the annotated point and text - any key for matplotlib.patches.polygon (eg facecolor) + any key for matplotlib.patches.polygon (e.g., facecolor) For physical coordinate systems (points or pixels) the origin is the (bottom, left) of the figure or axes. If the value is negative, diff --git a/examples/pylab_examples/customize_rc.py b/examples/pylab_examples/customize_rc.py index 9715f5f96e13..251b5bca8c8b 100644 --- a/examples/pylab_examples/customize_rc.py +++ b/examples/pylab_examples/customize_rc.py @@ -4,9 +4,9 @@ some examples of customizing rc params on the fly If you like to work interactively, and need to create different sets -of defaults for figures (eg one set of defaults for publication, one +of defaults for figures (e.g., one set of defaults for publication, one set for interactive exploration), you may want to define some -functions in a custom module that set the defaults, eg +functions in a custom module that set the defaults, e.g., def set_pub(): rc('font', weight='bold') # bold fonts are easier to see diff --git a/examples/pylab_examples/date_index_formatter.py b/examples/pylab_examples/date_index_formatter.py index 270ee2d319ca..6bd18636bf96 100644 --- a/examples/pylab_examples/date_index_formatter.py +++ b/examples/pylab_examples/date_index_formatter.py @@ -1,7 +1,7 @@ """ When plotting daily data, a frequent request is to plot the data -ignoring skips, eg no extra spaces for weekends. This is particularly +ignoring skips, e.g., no extra spaces for weekends. This is particularly common in financial time series, when you may have data for M-F and not Sat, Sun and you don't want gaps in the x axis. The approach is to simply use the integer index for the xdata and a custom tick diff --git a/examples/pylab_examples/major_minor_demo1.py b/examples/pylab_examples/major_minor_demo1.py index ec9db4673414..85f18ce81777 100644 --- a/examples/pylab_examples/major_minor_demo1.py +++ b/examples/pylab_examples/major_minor_demo1.py @@ -16,7 +16,7 @@ don't label minor ticks The MultipleLocator ticker class is used to place ticks on multiples of -some base. The FormatStrFormatter uses a string format string (eg +some base. The FormatStrFormatter uses a string format string (e.g., '%d' or '%1.2f' or '%1.1f cm' ) to format the tick The pylab interface grid command changes the grid settings of the diff --git a/examples/pylab_examples/set_and_get.py b/examples/pylab_examples/set_and_get.py index 45d92095bce9..886bd68933cf 100644 --- a/examples/pylab_examples/set_and_get.py +++ b/examples/pylab_examples/set_and_get.py @@ -55,7 +55,7 @@ Aliases: To reduce keystrokes in interactive mode, a number of properties - have short aliases, eg 'lw' for 'linewidth' and 'mec' for + have short aliases, e.g., 'lw' for 'linewidth' and 'mec' for 'markeredgecolor'. When calling set or get in introspection mode, these properties will be listed as 'fullname or aliasname', as in diff --git a/examples/pylab_examples/shared_axis_demo.py b/examples/pylab_examples/shared_axis_demo.py index c432552489eb..ba0d560d3b49 100644 --- a/examples/pylab_examples/shared_axis_demo.py +++ b/examples/pylab_examples/shared_axis_demo.py @@ -5,18 +5,18 @@ Changing the axis limits on one axes will be reflected automatically in the other, and vice-versa, so when you navigate with the toolbar the axes will follow each other on their shared axes. Ditto for -changes in the axis scaling (eg log vs linear). However, it is -possible to have differences in tick labeling, eg you can selectively +changes in the axis scaling (e.g., log vs linear). However, it is +possible to have differences in tick labeling, e.g., you can selectively turn off the tick labels on one axes. The example below shows how to customize the tick labels on the various axes. Shared axes share the tick locator, tick formatter, -view limits, and transformation (eg log, linear). But the ticklabels +view limits, and transformation (e.g., log, linear). But the ticklabels themselves do not share properties. This is a feature and not a bug, because you may want to make the tick labels smaller on the upper -axes, eg in the example below. +axes, e.g., in the example below. -If you want to turn off the ticklabels for a given axes (eg on +If you want to turn off the ticklabels for a given axes (e.g., on subplot(211) or subplot(212), you cannot do the standard trick setp(ax2, xticklabels=[]) diff --git a/examples/pylab_examples/toggle_images.py b/examples/pylab_examples/toggle_images.py index 14173edb953a..011e0c477d1c 100644 --- a/examples/pylab_examples/toggle_images.py +++ b/examples/pylab_examples/toggle_images.py @@ -11,7 +11,7 @@ As usual, we'll define some random images for demo. Real data is much more exciting! -Note, on the wx backend on some platforms (eg linux), you have to +Note, on the wx backend on some platforms (e.g., linux), you have to first click on the figure before the keypress events are activated. If you know how to fix this, please email us! diff --git a/examples/tests/backend_driver.py b/examples/tests/backend_driver.py index 619481b67044..5744b9c29e3c 100755 --- a/examples/tests/backend_driver.py +++ b/examples/tests/backend_driver.py @@ -307,7 +307,7 @@ 'wire3d_demo.py', ] -# dict from dir to files we know we don't want to test (eg examples +# dict from dir to files we know we don't want to test (e.g., examples # not using pyplot, examples requiring user input, animation examples, # examples that may only work in certain environs (usetex examples?), # examples that generate multiple figures diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py index b0c4c41b4c20..473a201c37e7 100644 --- a/lib/matplotlib/__init__.py +++ b/lib/matplotlib/__init__.py @@ -1135,7 +1135,7 @@ def rc(group, **kwargs): for ``lines.linewidth`` the group is ``lines``, for ``axes.facecolor``, the group is ``axes``, and so on. Group may also be a list or tuple of group names, e.g., (*xtick*, *ytick*). - *kwargs* is a dictionary attribute name/value pairs, eg:: + *kwargs* is a dictionary attribute name/value pairs, e.g.,:: rc('lines', linewidth=2, color='r') @@ -1363,7 +1363,7 @@ def tk_window_focus(): use(s[2:]) except (KeyError, ValueError): pass - # we don't want to assume all -d flags are backends, eg -debug + # we don't want to assume all -d flags are backends, e.g., -debug default_test_modules = [ 'matplotlib.tests.test_agg', diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index dc1980ee46fc..485bfd557cd6 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -1104,7 +1104,7 @@ def eventplot(self, positions, orientation='horizontal', lineoffsets=1, A float or array-like containing floats. *colors* - must be a sequence of RGBA tuples (eg arbitrary color + must be a sequence of RGBA tuples (e.g., arbitrary color strings, etc, not allowed) or a list of such sequences *linestyles* : diff --git a/lib/matplotlib/axes/_base.py b/lib/matplotlib/axes/_base.py index cc95908a6d0d..33b18de5a820 100644 --- a/lib/matplotlib/axes/_base.py +++ b/lib/matplotlib/axes/_base.py @@ -202,7 +202,7 @@ def _xy_from_xy(self, x, y): if self.command != 'plot': # the Line2D class can handle unitized data, with # support for post hoc unit changes etc. Other mpl - # artists, eg Polygon which _process_plot_var_args + # artists, e.g., Polygon which _process_plot_var_args # also serves on calls to fill, cannot. So this is a # hack to say: if you are not "plot", which is # creating Line2D, then convert the data now to @@ -420,7 +420,7 @@ def __init__(self, fig, rect, self.spines = self._gen_axes_spines() - # this call may differ for non-sep axes, eg polar + # this call may differ for non-sep axes, e.g., polar self._init_axis() if axisbg is None: @@ -2168,7 +2168,7 @@ def grid(self, b=None, which='major', axis='both', **kwargs): *axis* can be 'both' (default), 'x', or 'y' to control which set of gridlines are drawn. - *kwargs* are used to set the grid line properties, eg:: + *kwargs* are used to set the grid line properties, e.g.,:: ax.grid(color='r', linestyle='-', linewidth=2) diff --git a/lib/matplotlib/axes/_subplots.py b/lib/matplotlib/axes/_subplots.py index 1f6348a32dff..892d6e9df2b9 100644 --- a/lib/matplotlib/axes/_subplots.py +++ b/lib/matplotlib/axes/_subplots.py @@ -88,7 +88,7 @@ def __reduce__(self): return tuple(r) def get_geometry(self): - """get the subplot geometry, eg 2,2,3""" + """get the subplot geometry, e.g., 2,2,3""" rows, cols, num1, num2 = self.get_subplotspec().get_geometry() return rows, cols, num1 + 1 # for compatibility diff --git a/lib/matplotlib/backend_bases.py b/lib/matplotlib/backend_bases.py index cb1607cfccff..7b983eb5645f 100644 --- a/lib/matplotlib/backend_bases.py +++ b/lib/matplotlib/backend_bases.py @@ -1551,7 +1551,7 @@ class PickEvent(Event): the :class:`~matplotlib.artist.Artist` picked other - extra class dependent attrs -- eg a + extra class dependent attrs -- e.g., a :class:`~matplotlib.lines.Line2D` pick may define different extra attributes than a :class:`~matplotlib.collections.PatchCollection` pick event diff --git a/lib/matplotlib/backends/backend_template.py b/lib/matplotlib/backends/backend_template.py index bce2013212c5..f3e483d2f73b 100644 --- a/lib/matplotlib/backends/backend_template.py +++ b/lib/matplotlib/backends/backend_template.py @@ -32,7 +32,7 @@ matplotlib.use('module://my_backend') where my_backend.py is your module name. This syntax is also -recognized in the rc file and in the -d argument in pylab, eg:: +recognized in the rc file and in the -d argument in pylab, e.g.,:: python simple_plot.py -dmodule://my_backend @@ -227,7 +227,7 @@ class FigureCanvasTemplate(FigureCanvasBase): mouse movements and key presses to functions that call the base class methods button_press_event, button_release_event, motion_notify_event, key_press_event, and key_release_event. See, - eg backend_gtk.py, backend_wx.py and backend_tkagg.py + e.g., backend_gtk.py, backend_wx.py and backend_tkagg.py """ def draw(self): diff --git a/lib/matplotlib/collections.py b/lib/matplotlib/collections.py index 9e25ca090b26..b1452c59956a 100644 --- a/lib/matplotlib/collections.py +++ b/lib/matplotlib/collections.py @@ -987,7 +987,7 @@ def __init__(self, segments, # Can be None. can be a different length. *colors* - must be a sequence of RGBA tuples (eg arbitrary color + must be a sequence of RGBA tuples (e.g., arbitrary color strings, etc, not allowed). *antialiaseds* @@ -1169,7 +1169,7 @@ def __init__(self, a single numerical value *color* - must be a sequence of RGBA tuples (eg arbitrary color + must be a sequence of RGBA tuples (e.g., arbitrary color strings, etc, not allowed). *linestyle* [ 'solid' | 'dashed' | 'dashdot' | 'dotted' ] diff --git a/lib/matplotlib/contour.py b/lib/matplotlib/contour.py index 0d74a3a8461d..05dbb3356b14 100644 --- a/lib/matplotlib/contour.py +++ b/lib/matplotlib/contour.py @@ -77,7 +77,7 @@ def clabel(self, *args, **kwargs): Optional keyword arguments: *fontsize*: - size in points or relative size eg 'smaller', 'x-large' + size in points or relative size e.g., 'smaller', 'x-large' *colors*: - if *None*, the color of each label matches the color of @@ -1703,7 +1703,7 @@ def _initialize_x_y(self, z): *levels*: [level0, level1, ..., leveln] A list of floating point numbers indicating the level - curves to draw; eg to draw just the zero contour pass + curves to draw; e.g., to draw just the zero contour pass ``levels=[0]`` *origin*: [ *None* | 'upper' | 'lower' | 'image' ] diff --git a/lib/matplotlib/dates.py b/lib/matplotlib/dates.py index 385fcbbd88fb..72fc943e809d 100755 --- a/lib/matplotlib/dates.py +++ b/lib/matplotlib/dates.py @@ -78,9 +78,9 @@ * :class:`DayLocator`: locate specifed days of the month - * :class:`WeekdayLocator`: Locate days of the week, eg MO, TU + * :class:`WeekdayLocator`: Locate days of the week, e.g., MO, TU - * :class:`MonthLocator`: locate months, eg 7 for july + * :class:`MonthLocator`: locate months, e.g., 7 for july * :class:`YearLocator`: locate years that are multiples of base @@ -407,7 +407,7 @@ def __call__(self, x, pos=0): raise ValueError('DateFormatter found a value of x=0, which is ' 'an illegal date. This usually occurs because ' 'you have not informed the axis that it is ' - 'plotting dates, eg with ax.xaxis_date()') + 'plotting dates, e.g., with ax.xaxis_date()') dt = num2date(x, self.tz) return self.strftime(dt, self.fmt) @@ -1042,7 +1042,7 @@ def autoscale(self): class MonthLocator(RRuleLocator): """ - Make ticks on occurances of each month month, eg 1, 3, 12. + Make ticks on occurances of each month month, e.g., 1, 3, 12. """ def __init__(self, bymonth=None, bymonthday=1, interval=1, tz=None): """ diff --git a/lib/matplotlib/figure.py b/lib/matplotlib/figure.py index b334ca4edf88..2fd9286b75da 100644 --- a/lib/matplotlib/figure.py +++ b/lib/matplotlib/figure.py @@ -595,7 +595,7 @@ def figimage(self, X, Keyword Description ========= ========================================================= xo or yo An integer, the *x* and *y* image offset in pixels - cmap a :class:`matplotlib.colors.Colormap` instance, eg + cmap a :class:`matplotlib.colors.Colormap` instance, e.g., cm.jet. If *None*, default to the rc ``image.cmap`` value norm a :class:`matplotlib.colors.Normalize` instance. The @@ -649,7 +649,7 @@ def set_size_inches(self, *args, **kwargs): fig.set_size_inches((w,h) ) optional kwarg *forward=True* will cause the canvas size to be - automatically updated; eg you can resize the figure window + automatically updated; e.g., you can resize the figure window from the shell ACCEPTS: a w,h tuple with w,h in inches @@ -1663,7 +1663,7 @@ def figaspect(arg): determine the width and height for a figure that would fit array preserving aspect ratio. The figure width, height in inches are returned. Be sure to create an axes with equal with and height, - eg + e.g., Example usage:: diff --git a/lib/matplotlib/finance.py b/lib/matplotlib/finance.py index e346afb6b20f..53e831960bce 100644 --- a/lib/matplotlib/finance.py +++ b/lib/matplotlib/finance.py @@ -841,7 +841,7 @@ def candlestick(ax, quotes, width=0.2, colorup='k', colordown='r', an Axes instance to plot to quotes : sequence of (time, open, close, high, low, ...) sequences As long as the first 5 elements are these values, - the record can be as long as you want (eg it may store volume). + the record can be as long as you want (e.g., it may store volume). time must be in float days format - see date2num @@ -884,7 +884,7 @@ def candlestick_ochl(ax, quotes, width=0.2, colorup='k', colordown='r', an Axes instance to plot to quotes : sequence of (time, open, close, high, low, ...) sequences As long as the first 5 elements are these values, - the record can be as long as you want (eg it may store volume). + the record can be as long as you want (e.g., it may store volume). time must be in float days format - see date2num @@ -924,7 +924,7 @@ def candlestick_ohlc(ax, quotes, width=0.2, colorup='k', colordown='r', an Axes instance to plot to quotes : sequence of (time, open, high, low, close, ...) sequences As long as the first 5 elements are these values, - the record can be as long as you want (eg it may store volume). + the record can be as long as you want (e.g., it may store volume). time must be in float days format - see date2num diff --git a/lib/matplotlib/gridspec.py b/lib/matplotlib/gridspec.py index 5e8390b5a972..242a1a3564d1 100644 --- a/lib/matplotlib/gridspec.py +++ b/lib/matplotlib/gridspec.py @@ -48,7 +48,7 @@ def __init__(self, nrows, ncols, self.set_width_ratios(width_ratios) def get_geometry(self): - 'get the geometry of the grid, eg 2,3' + 'get the geometry of the grid, e.g., 2,3' return self._nrows, self._ncols def get_subplot_params(self, fig=None): @@ -406,7 +406,7 @@ def get_gridspec(self): def get_geometry(self): """ - get the subplot geometry, eg 2,2,3. Unlike SuplorParams, + get the subplot geometry, e.g., 2,2,3. Unlike SuplorParams, index is 0-based """ rows, cols = self.get_gridspec().get_geometry() diff --git a/lib/matplotlib/image.py b/lib/matplotlib/image.py index be7e94d5d36c..4178ce5a66de 100644 --- a/lib/matplotlib/image.py +++ b/lib/matplotlib/image.py @@ -1291,7 +1291,7 @@ def imsave(fname, arr, vmin=None, vmax=None, cmap=None, format=None, or *vmax* is None, that limit is determined from the *arr* min/max value. *cmap*: - cmap is a colors.Colormap instance, eg cm.jet. + cmap is a colors.Colormap instance, e.g., cm.jet. If None, default to the rc image.cmap value. *format*: One of the file extensions supported by the active diff --git a/lib/matplotlib/lines.py b/lib/matplotlib/lines.py index f9098d547de8..76f28b7a178c 100644 --- a/lib/matplotlib/lines.py +++ b/lib/matplotlib/lines.py @@ -189,7 +189,7 @@ class Line2D(Artist): """ A line - the line can have both a solid linestyle connecting all the vertices, and a marker at each vertex. Additionally, the - drawing of the solid line is influenced by the drawstyle, eg one + drawing of the solid line is influenced by the drawstyle, e.g., one can create "stepped" lines in various styles. diff --git a/lib/matplotlib/mathtext.py b/lib/matplotlib/mathtext.py index 388e209ec32f..08653ebdba5d 100644 --- a/lib/matplotlib/mathtext.py +++ b/lib/matplotlib/mathtext.py @@ -3011,7 +3011,7 @@ def parse(self, s, dpi = 72, prop = None): def to_mask(self, texstr, dpi=120, fontsize=14): """ *texstr* - A valid mathtext string, eg r'IQ: $\sigma_i=15$' + A valid mathtext string, e.g., r'IQ: $\sigma_i=15$' *dpi* The dots-per-inch to render the text @@ -3037,7 +3037,7 @@ def to_mask(self, texstr, dpi=120, fontsize=14): def to_rgba(self, texstr, color='black', dpi=120, fontsize=14): """ *texstr* - A valid mathtext string, eg r'IQ: $\sigma_i=15$' + A valid mathtext string, e.g., r'IQ: $\sigma_i=15$' *color* Any matplotlib color argument @@ -3077,7 +3077,7 @@ def to_png(self, filename, texstr, color='black', dpi=120, fontsize=14): A writable filename or fileobject *texstr* - A valid mathtext string, eg r'IQ: $\sigma_i=15$' + A valid mathtext string, e.g., r'IQ: $\sigma_i=15$' *color* A valid matplotlib color argument @@ -3102,7 +3102,7 @@ def get_depth(self, texstr, dpi=120, fontsize=14): image in pixels. *texstr* - A valid mathtext string, eg r'IQ: $\sigma_i=15$' + A valid mathtext string, e.g., r'IQ: $\sigma_i=15$' *dpi* The dots-per-inch to render the text diff --git a/lib/matplotlib/mlab.py b/lib/matplotlib/mlab.py index a2917b9e1dd1..3a44960cec88 100644 --- a/lib/matplotlib/mlab.py +++ b/lib/matplotlib/mlab.py @@ -2049,7 +2049,7 @@ class FIFOBuffer: and plot it to screen less freqeuently than the incoming. If you set the *dataLim* attr to - :class:`~matplotlib.transforms.BBox` (eg + :class:`~matplotlib.transforms.BBox` (e.g., :attr:`matplotlib.Axes.dataLim`), the *dataLim* will be updated as new data come in. @@ -2521,7 +2521,7 @@ def rec_groupby(r, groupby, stats): *r* is a numpy record array *groupby* is a sequence of record array attribute names that - together form the grouping key. eg ('date', 'productcode') + together form the grouping key. e.g., ('date', 'productcode') *stats* is a sequence of (*attr*, *func*, *outname*) tuples which will call ``x = func(attr)`` and assign *x* to the record array @@ -3859,7 +3859,7 @@ def poly_below(xmin, xs, ys): polygon that has a horizontal base at *xmin* and an upper bound at the *ys*. *xmin* is a scalar. - Intended for use with :meth:`matplotlib.axes.Axes.fill`, eg:: + Intended for use with :meth:`matplotlib.axes.Axes.fill`, e.g.,:: xv, yv = poly_below(0, x, y) ax.fill(xv, yv) @@ -3944,7 +3944,7 @@ def contiguous_regions(mask): def cross_from_below(x, threshold): """ return the indices into *x* where *x* crosses some threshold from - below, eg the i's where:: + below, e.g., the i's where:: x[i-1]=threshold @@ -3983,7 +3983,7 @@ def cross_from_below(x, threshold): def cross_from_above(x, threshold): """ return the indices into *x* where *x* crosses some threshold from - below, eg the i's where:: + below, e.g., the i's where:: x[i-1]>threshold and x[i]<=threshold diff --git a/lib/matplotlib/mpl-data/stylelib/ggplot.mplstyle b/lib/matplotlib/mpl-data/stylelib/ggplot.mplstyle index 54949aa6d7b5..5f7e8b3b20b6 100644 --- a/lib/matplotlib/mpl-data/stylelib/ggplot.mplstyle +++ b/lib/matplotlib/mpl-data/stylelib/ggplot.mplstyle @@ -14,7 +14,7 @@ axes.grid: True axes.titlesize: x-large axes.labelsize: large axes.labelcolor: 555555 -axes.axisbelow: True # grid/ticks are below elements (eg lines, text) +axes.axisbelow: True # grid/ticks are below elements (e.g., lines, text) axes.color_cycle: E24A33, 348ABD, 988ED5, 777777, FBC15E, 8EBA42, FFB5B8 # E24A33 : red diff --git a/lib/matplotlib/pyplot.py b/lib/matplotlib/pyplot.py index e204887c7d14..53ac1cf6761e 100644 --- a/lib/matplotlib/pyplot.py +++ b/lib/matplotlib/pyplot.py @@ -2182,7 +2182,7 @@ def clim(vmin=None, vmax=None): """ im = gci() if im is None: - raise RuntimeError('You must first define an image, eg with imshow') + raise RuntimeError('You must first define an image, e.g., with imshow') im.set_clim(vmin, vmax) draw_if_interactive() diff --git a/lib/matplotlib/text.py b/lib/matplotlib/text.py index 1f7b8e845350..96f285df1e2b 100644 --- a/lib/matplotlib/text.py +++ b/lib/matplotlib/text.py @@ -88,7 +88,7 @@ def get_rotation(rotation): position (x,y) rotation [ angle in degrees 'vertical' | 'horizontal' rotation_mode [ None | 'anchor'] - size or fontsize [size in points | relative size eg 'smaller', + size or fontsize [size in points | relative size e.g., 'smaller', 'x-large'] style or fontstyle [ 'normal' | 'italic' | 'oblique'] text string @@ -437,7 +437,7 @@ def _get_layout(self, renderer): def set_bbox(self, rectprops): """ Draw a bounding box around self. rectprops are any settable - properties for a rectangle, eg facecolor='red', alpha=0.5. + properties for a rectangle, e.g., facecolor='red', alpha=0.5. t.set_bbox(dict(facecolor='red', alpha=0.5)) @@ -677,7 +677,7 @@ def get_prop_tup(self): Return a hashable tuple of properties. Not intended to be human readable, but useful for backends who - want to cache derived information about text (eg layouts) and + want to cache derived information about text (e.g., layouts) and need to know if the text has changed. """ x, y = self.get_position() @@ -1121,7 +1121,7 @@ def get_prop_tup(self): Return a hashable tuple of properties. Not intended to be human readable, but useful for backends who - want to cache derived information about text (eg layouts) and + want to cache derived information about text (e.g., layouts) and need to know if the text has changed. """ props = [p for p in Text.get_prop_tup(self)] diff --git a/lib/matplotlib/ticker.py b/lib/matplotlib/ticker.py index b1ba08349fc5..420da91550ea 100644 --- a/lib/matplotlib/ticker.py +++ b/lib/matplotlib/ticker.py @@ -35,7 +35,7 @@ The Locator class is the base class for all tick locators. The locators handle autoscaling of the view limits based on the data limits, and the choosing of tick locations. A useful semi-automatic tick locator is -MultipleLocator. You initialize this with a base, eg 10, and it picks axis +MultipleLocator. You initialize this with a base, e.g., 10, and it picks axis limits and ticks that are multiples of your base. The Locator subclasses defined here are @@ -93,7 +93,7 @@ ax.yaxis.set_major_locator( ymajorLocator ) ax.yaxis.set_minor_locator( yminorLocator ) -The default minor locator is the NullLocator, eg no minor ticks on by +The default minor locator is the NullLocator, e.g., no minor ticks on by default. Tick formatting @@ -992,7 +992,7 @@ def refresh(self): class IndexLocator(Locator): """ Place a tick on every multiple of some base number of points - plotted, eg on every 5th point. It is assumed that you are doing + plotted, e.g., on every 5th point. It is assumed that you are doing index plotting; ie the axis is 0, len(data). This is mainly useful for x ticks. """ diff --git a/lib/matplotlib/tri/tricontour.py b/lib/matplotlib/tri/tricontour.py index baa9d2c74d22..497d8ac400a3 100644 --- a/lib/matplotlib/tri/tricontour.py +++ b/lib/matplotlib/tri/tricontour.py @@ -186,7 +186,7 @@ def _contour_args(self, args, kwargs): *levels* [level0, level1, ..., leveln] A list of floating point numbers indicating the level - curves to draw; eg to draw just the zero contour pass + curves to draw; e.g., to draw just the zero contour pass ``levels=[0]`` *origin*: [ *None* | 'upper' | 'lower' | 'image' ] diff --git a/lib/matplotlib/units.py b/lib/matplotlib/units.py index 24df5a350c6d..9e318262fcc5 100644 --- a/lib/matplotlib/units.py +++ b/lib/matplotlib/units.py @@ -1,9 +1,9 @@ """ The classes here provide support for using custom classes with -matplotlib, eg those that do not expose the array interface but know +matplotlib, e.g., those that do not expose the array interface but know how to converter themselves to arrays. It also supoprts classes with units and units conversion. Use cases include converters for custom -objects, eg a list of datetime objects, as well as for objects that +objects, e.g., a list of datetime objects, as well as for objects that are unit aware. We don't assume any particular units implementation, rather a units implementation must provide a ConversionInterface, and the register with the Registry converter dictionary. For example, diff --git a/lib/mpl_toolkits/axes_grid1/axes_divider.py b/lib/mpl_toolkits/axes_grid1/axes_divider.py index 5f3e336bcd78..6fda7a3e6cbd 100644 --- a/lib/mpl_toolkits/axes_grid1/axes_divider.py +++ b/lib/mpl_toolkits/axes_grid1/axes_divider.py @@ -458,7 +458,7 @@ def update_params(self): self.figbox = self.get_subplotspec().get_position(self.figure) def get_geometry(self): - 'get the subplot geometry, eg 2,2,3' + 'get the subplot geometry, e.g., 2,2,3' rows, cols, num1, num2 = self.get_subplotspec().get_geometry() return rows, cols, num1+1 # for compatibility diff --git a/matplotlibrc.template b/matplotlibrc.template index fdbbf26d48cd..7e0edc723ad9 100644 --- a/matplotlibrc.template +++ b/matplotlibrc.template @@ -24,7 +24,7 @@ # Colors: for the color values below, you can either use - a # matplotlib color string, such as r, k, or b - an rgb tuple, such as # (1.0, 0.5, 0.0) - a hex string, such as ff00ff or #ff00ff - a scalar -# grayscale intensity such as 0.75 - a legal html color name, eg red, +# grayscale intensity such as 0.75 - a legal html color name, e.g., red, # blue, darkslategray #### CONFIGURATION BEGINS HERE @@ -68,7 +68,7 @@ backend : %(backend)s #interactive : False #toolbar : toolbar2 # None | toolbar2 ("classic" is deprecated) -#timezone : UTC # a pytz timezone string, eg US/Central or Europe/Paris +#timezone : UTC # a pytz timezone string, e.g., US/Central or Europe/Paris # Where your matplotlib data lives if you installed to a non-default # location. This is where the matplotlib fonts, bitmaps, etc reside @@ -445,7 +445,7 @@ backend : %(backend)s # # You can override the rc default verbosity from the command line by # giving the flags --verbose-LEVEL where LEVEL is one of the legal -# levels, eg --verbose-helpful. +# levels, e.g., --verbose-helpful. # # You can access the verbose instance in your code # from matplotlib import verbose. From 3b9ef1383d6f45d7dd094d980083e06eee3023e7 Mon Sep 17 00:00:00 2001 From: Yuval Langer Date: Sat, 1 Nov 2014 19:03:01 +0200 Subject: [PATCH 3/4] `ie,` to `i.e.,` Used: ```bash find * -type f -exec sed -i 's/\bie,/i.e.,/g' {} \; ``` --- doc/users/pyplot_tutorial.rst | 2 +- lib/matplotlib/afm.py | 2 +- lib/matplotlib/mlab.py | 2 +- lib/matplotlib/tests/test_mlab.py | 2 +- lib/matplotlib/text.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/users/pyplot_tutorial.rst b/doc/users/pyplot_tutorial.rst index 22d9800a625c..b9db95e56ec8 100644 --- a/doc/users/pyplot_tutorial.rst +++ b/doc/users/pyplot_tutorial.rst @@ -170,7 +170,7 @@ numcols, fignum`` where ``fignum`` ranges from 1 to ``numrows*numcols``. The commas in the ``subplot`` command are optional if ``numrows*numcols<10``. So ``subplot(211)`` is identical to ``subplot(2,1,1)``. You can create an arbitrary number of subplots -and axes. If you want to place an axes manually, ie, not on a +and axes. If you want to place an axes manually, i.e., not on a rectangular grid, use the :func:`~matplotlib.pyplot.axes` command, which allows you to specify the location as ``axes([left, bottom, width, height])`` where all values are in fractional (0 to 1) diff --git a/lib/matplotlib/afm.py b/lib/matplotlib/afm.py index e83299922ddb..754e3693d511 100644 --- a/lib/matplotlib/afm.py +++ b/lib/matplotlib/afm.py @@ -446,7 +446,7 @@ def get_str_bbox(self, s): def get_name_char(self, c, isord=False): """ - Get the name of the character, ie, ';' is 'semicolon' + Get the name of the character, i.e., ';' is 'semicolon' """ if not isord: c = ord(c) diff --git a/lib/matplotlib/mlab.py b/lib/matplotlib/mlab.py index 3a44960cec88..5d2ee4732b3f 100644 --- a/lib/matplotlib/mlab.py +++ b/lib/matplotlib/mlab.py @@ -1622,7 +1622,7 @@ def prepca(P, frac=0): - *Pcomponents* : a (numVars, numObs) array - - *Trans* : the weights matrix, ie, *Pcomponents* = *Trans* * + - *Trans* : the weights matrix, i.e., *Pcomponents* = *Trans* * *P* - *fracVar* : the fraction of the variance accounted for by each diff --git a/lib/matplotlib/tests/test_mlab.py b/lib/matplotlib/tests/test_mlab.py index e35661d56622..9cd4379bd5cb 100644 --- a/lib/matplotlib/tests/test_mlab.py +++ b/lib/matplotlib/tests/test_mlab.py @@ -2906,7 +2906,7 @@ def test_evaluate_diff_dim(self): np.testing.assert_array_almost_equal(y, y_expected, 7) def test_evaluate_inv_dim(self): - """ Invert the dimensions. ie, Give the dataset a dimension of + """ Invert the dimensions. i.e., Give the dataset a dimension of 1 [3,2,4], and the points will have a dimension of 3 [[3],[2],[4]]. ValueError should be raised""" np.random.seed(8765678) diff --git a/lib/matplotlib/text.py b/lib/matplotlib/text.py index 96f285df1e2b..25bd70e5988d 100644 --- a/lib/matplotlib/text.py +++ b/lib/matplotlib/text.py @@ -1703,7 +1703,7 @@ def __init__(self, s, xy, annotated. If *d* is the distance between the text and annotated point, shrink will shorten the arrow so the tip and base are shink percent of the distance *d* away from - the endpoints. ie, ``shrink=0.05 is 5%%`` + the endpoints. i.e., ``shrink=0.05 is 5%%`` ? any key for :class:`matplotlib.patches.polygon` ========= =========================================================== From 546466be30a03c630e575c62d9f206798260e31c Mon Sep 17 00:00:00 2001 From: Yuval Langer Date: Sat, 1 Nov 2014 19:06:04 +0200 Subject: [PATCH 4/4] `ie` (without a comma) to `i.e.,` Used: ```bash find * -type f -exec sed -i 's/\bie\b/i.e.,/g' {} \; ``` --- doc/api/api_changes.rst | 2 +- doc/faq/usage_faq.rst | 2 +- examples/pylab_examples/broken_barh.py | 2 +- lib/matplotlib/axes/_axes.py | 6 +++--- lib/matplotlib/collections.py | 8 ++++---- lib/matplotlib/mlab.py | 2 +- lib/matplotlib/quiver.py | 2 +- lib/matplotlib/ticker.py | 2 +- lib/mpl_toolkits/axes_grid1/axes_divider.py | 2 +- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/doc/api/api_changes.rst b/doc/api/api_changes.rst index 139214578421..5449ce61827a 100644 --- a/doc/api/api_changes.rst +++ b/doc/api/api_changes.rst @@ -2078,7 +2078,7 @@ Transformations implementations, matplotlib.transforms.SeparableTransformation and matplotlib.transforms.Affine. The SeparableTransformation is constructed with the bounding box of the input (this determines the - rectangular coordinate system of the input, ie the x and y view + rectangular coordinate system of the input, i.e., the x and y view limits), the bounding box of the display, and possibly nonlinear transformations of x and y. The 2 most frequently used transformations, data coordinates -> display and axes coordinates -> diff --git a/doc/faq/usage_faq.rst b/doc/faq/usage_faq.rst index 1b25d8a0b537..c03454adbf2f 100644 --- a/doc/faq/usage_faq.rst +++ b/doc/faq/usage_faq.rst @@ -295,7 +295,7 @@ others in web application servers to dynamically serve up graphs. To support all of these use cases, matplotlib can target different outputs, and each of these capabilities is called a backend; the -"frontend" is the user facing code, ie the plotting code, whereas the +"frontend" is the user facing code, i.e., the plotting code, whereas the "backend" does all the hard work behind-the-scenes to make the figure. There are two types of backends: user interface backends (for use in pygtk, wxpython, tkinter, qt4, or macosx; also referred to as diff --git a/examples/pylab_examples/broken_barh.py b/examples/pylab_examples/broken_barh.py index 9d8085f52252..b84a3284a825 100644 --- a/examples/pylab_examples/broken_barh.py +++ b/examples/pylab_examples/broken_barh.py @@ -1,5 +1,5 @@ """ -Make a "broken" horizontal bar plot, ie one with gaps +Make a "broken" horizontal bar plot, i.e., one with gaps """ import matplotlib.pyplot as plt diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index 485bfd557cd6..4c21546518c9 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -2213,11 +2213,11 @@ def broken_barh(self, xranges, yrange, **kwargs): %(BrokenBarHCollection)s - these can either be a single argument, ie:: + these can either be a single argument, i.e.,:: facecolors = 'black' - or a sequence of arguments for the various bars, ie:: + or a sequence of arguments for the various bars, i.e.,:: facecolors = ('black', 'red', 'green') @@ -5420,7 +5420,7 @@ def hist(self, x, bins=10, range=None, normed=False, weights=None, normed : boolean, optional, default: False If `True`, the first element of the return tuple will be the counts normalized to form a probability density, i.e., - ``n/(len(x)`dbin)``, ie the integral of the histogram will sum to + ``n/(len(x)`dbin)``, i.e., the integral of the histogram will sum to 1. If *stacked* is also *True*, the sum of the histograms is normalized to 1. diff --git a/lib/matplotlib/collections.py b/lib/matplotlib/collections.py index b1452c59956a..cba1f70d69e2 100644 --- a/lib/matplotlib/collections.py +++ b/lib/matplotlib/collections.py @@ -70,7 +70,7 @@ class Collection(artist.Artist, cm.ScalarMappable): The use of :class:`~matplotlib.cm.ScalarMappable` is optional. If the :class:`~matplotlib.cm.ScalarMappable` matrix _A is not None - (ie a call to set_array has been made), at draw time a call to + (i.e., a call to set_array has been made), at draw time a call to scalar mappable will be made to set the face colors. """ _offsets = np.array([], np.float_) @@ -1030,7 +1030,7 @@ def __init__(self, segments, # Can be None. The use of :class:`~matplotlib.cm.ScalarMappable` is optional. If the :class:`~matplotlib.cm.ScalarMappable` array - :attr:`~matplotlib.cm.ScalarMappable._A` is not None (ie a call to + :attr:`~matplotlib.cm.ScalarMappable._A` is not None (i.e., a call to :meth:`~matplotlib.cm.ScalarMappable.set_array` has been made), at draw time a call to scalar mappable will be made to set the colors. """ @@ -1190,7 +1190,7 @@ def __init__(self, The use of :class:`~matplotlib.cm.ScalarMappable` is optional. If the :class:`~matplotlib.cm.ScalarMappable` array - :attr:`~matplotlib.cm.ScalarMappable._A` is not None (ie a call to + :attr:`~matplotlib.cm.ScalarMappable._A` is not None (i.e., a call to :meth:`~matplotlib.cm.ScalarMappable.set_array` has been made), at draw time a call to scalar mappable will be made to set the colors. @@ -1517,7 +1517,7 @@ def __init__(self, patches, match_original=False, **kwargs): The use of :class:`~matplotlib.cm.ScalarMappable` is optional. If the :class:`~matplotlib.cm.ScalarMappable` matrix _A is not - None (ie a call to set_array has been made), at draw time a + None (i.e., a call to set_array has been made), at draw time a call to scalar mappable will be made to set the face colors. """ diff --git a/lib/matplotlib/mlab.py b/lib/matplotlib/mlab.py index 5d2ee4732b3f..c308bfb14191 100644 --- a/lib/matplotlib/mlab.py +++ b/lib/matplotlib/mlab.py @@ -1677,7 +1677,7 @@ def __init__(self, a, standardize=True): *Y* : a projected into PCA space - The factor loadings are in the Wt factor, ie the factor + The factor loadings are in the Wt factor, i.e., the factor loadings for the 1st principal component are given by Wt[0]. This row is also the 1st eigenvector. diff --git a/lib/matplotlib/quiver.py b/lib/matplotlib/quiver.py index fa7f02db11b5..3a7bdaf8f747 100644 --- a/lib/matplotlib/quiver.py +++ b/lib/matplotlib/quiver.py @@ -915,7 +915,7 @@ def _find_tails(self, mag, rounding=True, half=5, full=10, flag=50): ''' Find how many of each of the tail pieces is necessary. Flag specifies the increment for a flag, barb for a full barb, and half for - half a barb. Mag should be the magnitude of a vector (ie. >= 0). + half a barb. Mag should be the magnitude of a vector (i.e., >= 0). This returns a tuple of: diff --git a/lib/matplotlib/ticker.py b/lib/matplotlib/ticker.py index 420da91550ea..23073fd82489 100644 --- a/lib/matplotlib/ticker.py +++ b/lib/matplotlib/ticker.py @@ -993,7 +993,7 @@ class IndexLocator(Locator): """ Place a tick on every multiple of some base number of points plotted, e.g., on every 5th point. It is assumed that you are doing - index plotting; ie the axis is 0, len(data). This is mainly + index plotting; i.e., the axis is 0, len(data). This is mainly useful for x ticks. """ def __init__(self, base, offset): diff --git a/lib/mpl_toolkits/axes_grid1/axes_divider.py b/lib/mpl_toolkits/axes_grid1/axes_divider.py index 6fda7a3e6cbd..2c8c29e5dd36 100644 --- a/lib/mpl_toolkits/axes_grid1/axes_divider.py +++ b/lib/mpl_toolkits/axes_grid1/axes_divider.py @@ -390,7 +390,7 @@ def __init__(self, fig, *args, **kwargs): # total = rows*cols # num -= 1 # convert from matlab to python indexing - # # ie num in range(0,total) + # # i.e., num in range(0,total) # if num >= total: # raise ValueError( 'Subplot number exceeds total subplots') # self._rows = rows