130
130
#
131
131
# Coding styles
132
132
# =============
133
-
133
+ #
134
134
# The object-oriented and the pyplot interfaces
135
135
# ---------------------------------------------
136
136
#
172
172
###############################################################################
173
173
# (In addition, there is a third approach, for the case when embedding
174
174
# Matplotlib in a GUI application, which completely drops pyplot, even for
175
- # figure creation. See the corresponding section in the gallery for more info
176
- # ( :ref:`user_interfaces`) .)
175
+ # figure creation. See the corresponding section in the gallery for more info:
176
+ # :ref:`user_interfaces`.)
177
177
#
178
178
# Matplotlib's documentation and examples use both the OO and the pyplot
179
179
# styles. In general, we suggest using the OO style, particularly for
@@ -211,8 +211,6 @@ def my_plotter(ax, data1, data2, param_dict):
211
211
my_plotter (ax2 , data3 , data4 , {'marker' : 'o' })
212
212
213
213
###############################################################################
214
- # These examples provide convenience for more complex graphs.
215
- #
216
214
# Note that if you want to install these as a python package, or any other
217
215
# customizations you could use use one of the many templates on the web;
218
216
# Matplotlib has one at `mpl-cookiecutter
@@ -260,8 +258,8 @@ def my_plotter(ax, data1, data2, param_dict):
260
258
# Marker size depends on the method being used. `~.Axes.plot` specifies
261
259
# markersize in points, and is generally the "diameter" or width of the
262
260
# marker. `~.Axes.scatter` specifies markersize as approximately
263
- # proportional to the visual area of the marker. There are also an array of
264
- # markerstyles available as string codes (see :mod:`~.matplotlib.markers`) or
261
+ # proportional to the visual area of the marker. There is an array of
262
+ # markerstyles available as string codes (see :mod:`~.matplotlib.markers`), or
265
263
# users can define their own `~.MarkerStyle` (see
266
264
# :doc:`/gallery/lines_bars_and_markers/marker_reference`):
267
265
@@ -280,7 +278,7 @@ def my_plotter(ax, data1, data2, param_dict):
280
278
# Axes labels and text
281
279
# --------------------
282
280
#
283
- # `~.Axes.set_xlabel`, `~.Axes.set_ylabel` and `~.Axes.set_title` are used to
281
+ # `~.Axes.set_xlabel`, `~.Axes.set_ylabel`, and `~.Axes.set_title` are used to
284
282
# add text in the indicated locations (see :doc:`/tutorials/text/text_intro` for
285
283
# more discussion). Text can also be directly added to plots using
286
284
# `~.Axes.text`:
@@ -421,7 +419,7 @@ def my_plotter(ax, data1, data2, param_dict):
421
419
# Plotting dates and strings
422
420
# --------------------------
423
421
#
424
- # Matplotlib can handle plotting arrays of dates and arrays of strings as
422
+ # Matplotlib can handle plotting arrays of dates and arrays of strings, as
425
423
# well as floating point numbers. These get special locators and formatters
426
424
# as appropriate. For dates:
427
425
@@ -446,8 +444,8 @@ def my_plotter(ax, data1, data2, param_dict):
446
444
##############################################################################
447
445
# One caveat about categorical plotting is that some methods of parsing
448
446
# text files return a list of strings, even if the strings all represent
449
- # numbers or dates. If you pass 1000 strings Matplotlib will think you
450
- # meant 1000 categories and will add 1000 ticks to your plot.
447
+ # numbers or dates. If you pass 1000 strings, Matplotlib will think you
448
+ # meant 1000 categories and will add 1000 ticks to your plot!
451
449
#
452
450
# Color mapped data
453
451
# =================
@@ -507,7 +505,9 @@ def my_plotter(ax, data1, data2, param_dict):
507
505
# :doc:`/gallery/subplots_axes_and_figures/colorbar_placement` for
508
506
# details. You can also change the appearance of colorbars with the
509
507
# *extend* keyword to add arrows to the ends, and *shrink* and *aspect* to
510
- # control the size.
508
+ # control the size. Finally, the colorbar will have default Locators
509
+ # and Formatters appropriate to the Norm. These can be changed as for
510
+ # other axis objects.
511
511
#
512
512
#
513
513
# Working with multiple figures and axes
0 commit comments