@@ -57,7 +57,7 @@ class in the matplotlib API, and the one you will be working with most
57
57
graphics primitives (:class:`~matplotlib.lines.Line2D`,
58
58
:class:`~matplotlib.text.Text`,
59
59
:class:`~matplotlib.patches.Rectangle`,
60
- :class:`~matplotlib.image.Image `, respectively). These helper methods
60
+ :class:`~matplotlib.image.AxesImage `, respectively). These helper methods
61
61
will take your data (e.g., ``numpy`` arrays and strings) and create
62
62
primitive ``Artist`` instances as needed (e.g., ``Line2D``), add them to
63
63
the relevant containers, and draw them when requested. Most of you
@@ -423,7 +423,7 @@ class in the matplotlib API, and the one you will be working with most
423
423
# In [263]: rect = matplotlib.patches.Rectangle( (1,1), width=5, height=12)
424
424
#
425
425
# # by default the axes instance is None
426
- # In [264]: print(rect.get_axes() )
426
+ # In [264]: print(rect.axes )
427
427
# None
428
428
#
429
429
# # and the transformation instance is set to the "identity transform"
@@ -435,7 +435,7 @@ class in the matplotlib API, and the one you will be working with most
435
435
#
436
436
# # and notice that the ax.add_patch method has set the axes
437
437
# # instance
438
- # In [267]: print(rect.get_axes() )
438
+ # In [267]: print(rect.axes )
439
439
# Axes(0.125,0.1;0.775x0.8)
440
440
#
441
441
# # and the transformation has been set too
@@ -555,25 +555,23 @@ class in the matplotlib API, and the one you will be working with most
555
555
axis .get_ticklabels ()
556
556
557
557
###############################################################################
558
- # note there are twice as many ticklines as labels because by
559
- # default there are tick lines at the top and bottom but only tick
560
- # labels below the xaxis; this can be customized
558
+ # note there are twice as many ticklines as labels because by default there are
559
+ # tick lines at the top and bottom but only tick labels below the xaxis;
560
+ # however, this can be customized.
561
561
562
562
axis .get_ticklines ()
563
563
564
564
###############################################################################
565
- # by default you get the major ticks back
566
-
567
- axis .get_ticklines ()
568
-
569
- ###############################################################################
570
- # but you can also ask for the minor ticks
565
+ # And with the above methods, you only get lists of major ticks back by default,
566
+ # but you can also ask for the minor ticks:
571
567
568
+ axis .get_ticklabels (minor = True )
572
569
axis .get_ticklines (minor = True )
573
570
571
+ ###############################################################################
574
572
# Here is a summary of some of the useful accessor methods of the ``Axis``
575
573
# (these have corresponding setters where useful, such as
576
- # set_major_formatter)
574
+ # :meth:`~matplotlib.axis.Axis. set_major_formatter`. )
577
575
#
578
576
# ====================== =========================================================
579
577
# Accessor method Description
0 commit comments