diff --git a/.gitignore b/.gitignore index 722a42ec6185..ddf62f3d4497 100644 --- a/.gitignore +++ b/.gitignore @@ -62,6 +62,7 @@ doc/_templates/gallery.html doc/users/installing.rst doc/_static/matplotlibrc doc/pyplots/tex_demo.png +doc/api/_as_gen lib/dateutil examples/*/*.pdf examples/*/*.png diff --git a/doc/_static/mpl.css b/doc/_static/mpl.css index 722a58bb17ae..a9a7089f239c 100644 --- a/doc/_static/mpl.css +++ b/doc/_static/mpl.css @@ -6,7 +6,6 @@ body { font-family: "Helvetica Neue", Helvetica, 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva', 'Verdana', sans-serif; font-size: 14px; - letter-spacing: -0.01em; line-height: 150%; text-align: center; background-color: #BFD1D4; @@ -272,7 +271,7 @@ h2 { } h3 { - margin: 1em 0 -0.3em 0; + margin: 0.2em 0 0.1em 0; font-size: 1.2em; } @@ -513,19 +512,13 @@ table.docutils { .longtable.docutils { font-size: 12px; margin-bottom: 30px; - background-color: #ccc; } .longtable.docutils, .longtable.docutils td { border-color: #ccc; } -/* module summary table */ -.longtable.docutils { - font-size: 12px; - margin-bottom: 30px; -} -.longtable.docutils, .longtable.docutils td { - border-color: #ccc; +.longtable.docutils tr.row-even{ + background-color: #eff3f4; } /* function and class description */ @@ -560,16 +553,20 @@ dl.class dd, dl.function dd { } /* function and class description */ -dl.class, dl.function, dl.method, dl.attribute { +dl.function, dl.method, dl.attribute { border-top: 1px solid #ccc; padding-top: 6px; } -dl.class, dl.function { +dl.function { border-top: 1px solid #888; - margin-top: 15px; + margin-top: 15px; } +dl.class { + padding-top: 6px; + margin-top: 15px; +} .descclassname { color: #aaa; @@ -705,7 +702,7 @@ div.responsive_subfig{ /* Include content, padding and border in width. This should */ /* avoid having to use tricks like "width: 24.9999%" */ - box-sizing: border-box; + box-sizing: border-box; } div.responsive_subfig img { diff --git a/doc/api/artist_api.rst b/doc/api/artist_api.rst index eff8d5497b31..a146df58c9f8 100644 --- a/doc/api/artist_api.rst +++ b/doc/api/artist_api.rst @@ -1,17 +1,216 @@ .. _artist-api: -******* -artists -******* +=================== + ``artist`` Module +=================== -.. inheritance-diagram:: matplotlib.patches matplotlib.lines matplotlib.text matplotlib.offsetbox matplotlib.image - :parts: 2 +.. inheritance-diagram:: matplotlib.axes._axes.Axes matplotlib.axes._base._AxesBase matplotlib.axis.Axis matplotlib.axis.Tick matplotlib.axis.XAxis matplotlib.axis.XTick matplotlib.axis.YAxis matplotlib.axis.YTick matplotlib.collections.AsteriskPolygonCollection matplotlib.collections.BrokenBarHCollection matplotlib.collections.CircleCollection matplotlib.collections.Collection matplotlib.collections.EllipseCollection matplotlib.collections.EventCollection matplotlib.collections.LineCollection matplotlib.collections.PatchCollection matplotlib.collections.PathCollection matplotlib.collections.PolyCollection matplotlib.collections.QuadMesh matplotlib.collections.RegularPolyCollection matplotlib.collections.StarPolygonCollection matplotlib.collections.TriMesh matplotlib.collections._CollectionWithSizes matplotlib.contour.ClabelText matplotlib.figure.Figure matplotlib.image.AxesImage matplotlib.image.BboxImage matplotlib.image.FigureImage matplotlib.image.NonUniformImage matplotlib.image.PcolorImage matplotlib.image._ImageBase matplotlib.legend.Legend matplotlib.lines.Line2D matplotlib.offsetbox.AnchoredOffsetbox matplotlib.offsetbox.AnchoredText matplotlib.offsetbox.AnnotationBbox matplotlib.offsetbox.AuxTransformBox matplotlib.offsetbox.DrawingArea matplotlib.offsetbox.HPacker matplotlib.offsetbox.OffsetBox matplotlib.offsetbox.OffsetImage matplotlib.offsetbox.PackerBase matplotlib.offsetbox.PaddedBox matplotlib.offsetbox.TextArea matplotlib.offsetbox.VPacker matplotlib.patches.Arc matplotlib.patches.Arrow matplotlib.patches.Circle matplotlib.patches.CirclePolygon matplotlib.patches.ConnectionPatch matplotlib.patches.Ellipse matplotlib.patches.FancyArrow matplotlib.patches.FancyArrowPatch matplotlib.patches.FancyBboxPatch matplotlib.patches.Patch matplotlib.patches.PathPatch matplotlib.patches.Polygon matplotlib.patches.Rectangle matplotlib.patches.RegularPolygon matplotlib.patches.Shadow matplotlib.patches.Wedge matplotlib.patches.YAArrow matplotlib.projections.geo.AitoffAxes matplotlib.projections.geo.GeoAxes matplotlib.projections.geo.HammerAxes matplotlib.projections.geo.LambertAxes matplotlib.projections.geo.MollweideAxes matplotlib.projections.polar.PolarAxes matplotlib.quiver.Barbs matplotlib.quiver.Quiver matplotlib.quiver.QuiverKey matplotlib.spines.Spine matplotlib.table.Cell matplotlib.table.CustomCell matplotlib.table.Table matplotlib.text.Annotation matplotlib.text.Text matplotlib.text.TextWithDash + :parts: 1 :private-bases: -:mod:`matplotlib.artist` -======================== + .. automodule:: matplotlib.artist - :members: - :undoc-members: - :show-inheritance: + + +``Artist`` class +================ + + +Interactive +----------- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Artist.add_callback + Artist.format_cursor_data + Artist.get_contains + Artist.get_cursor_data + Artist.get_picker + Artist.hitlist + Artist.mouseover + Artist.pchanged + Artist.pick + Artist.pickable + Artist.remove_callback + Artist.set_contains + Artist.set_picker + Artist.contains + + +Margins and Autoscaling +----------------------- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Artist.get_bottom_margin + Artist.get_left_margin + Artist.get_margins + Artist.get_top_margin + Artist.margins + Artist.left_margin + Artist.get_right_margin + Artist.bottom_margin + Artist.right_margin + Artist.set_bottom_margin + Artist.set_left_margin + Artist.set_margins + Artist.set_right_margin + Artist.set_top_margin + Artist.top_margin + +Clipping +-------- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Artist.get_clip_box + Artist.get_clip_on + Artist.get_clip_path + Artist.set_clip_box + Artist.set_clip_on + Artist.set_clip_path + +Bulk Properties +--------------- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Artist.update + Artist.update_from + Artist.properties + Artist.set + + +Drawing +------- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Artist.draw + Artist.get_animated + Artist.set_animated + + Artist.get_agg_filter + + Artist.get_alpha + Artist.get_snap + Artist.get_visible + Artist.get_zorder + Artist.set_agg_filter + Artist.set_alpha + + Artist.set_sketch_params + Artist.set_snap + Artist.get_rasterized + Artist.get_sketch_params + Artist.set_path_effects + Artist.set_rasterized + Artist.zorder + Artist.set_visible + Artist.set_zorder + Artist.get_window_extent + Artist.get_path_effects + Artist.get_transformed_clip_path_and_affine + + + +Figure and Axes +--------------- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Artist.remove + + Artist.axes + Artist.get_axes + Artist.set_axes + + Artist.set_figure + Artist.get_figure + Artist.is_figure_set + +Children +-------- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Artist.get_children + Artist.findobj + + +Transform +--------- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Artist.set_transform + Artist.get_transform + Artist.is_transform_set + + + +Units +----- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Artist.convert_xunits + Artist.convert_yunits + Artist.have_units + +Metadata +-------- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Artist.get_gid + Artist.get_label + Artist.set_gid + Artist.set_label + Artist.get_url + Artist.set_url + Artist.aname + +Stale +----- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Artist.stale + +Functions +========= + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + allow_rasterization + get + getp + setp + kwdoc + ArtistInspector diff --git a/doc/api/axes_api.rst b/doc/api/axes_api.rst index 38791e242cd8..ef535514b11f 100644 --- a/doc/api/axes_api.rst +++ b/doc/api/axes_api.rst @@ -1,12 +1,668 @@ -**** -axes -**** +================ + ``Axes`` class +================ +.. currentmodule:: matplotlib.axes +.. autoclass:: Axes -:mod:`matplotlib.axes` -====================== +.. contents:: Table of Contents + :depth: 2 + :local: + :backlinks: entry -.. autoclass:: matplotlib.axes.Axes - :members: - :undoc-members: - :inherited-members: + +Plotting +======== + +Basic +----- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axes.plot + Axes.errorbar + Axes.scatter + + Axes.plot_date + Axes.step + + Axes.loglog + Axes.semilogx + Axes.semilogy + + Axes.fill_between + Axes.fill_betweenx + + Axes.bar + Axes.barh + + Axes.stem + Axes.eventplot + + Axes.pie + + Axes.stackplot + + + Axes.broken_barh + Axes.vlines + Axes.hlines + Axes.fill + +Spans +----- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axes.axhline + Axes.axhspan + Axes.axvline + Axes.axvspan + +Spectral +-------- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axes.acorr + Axes.angle_spectrum + Axes.cohere + Axes.csd + Axes.magnitude_spectrum + Axes.phase_spectrum + Axes.psd + Axes.specgram + Axes.xcorr + +Statistics +---------- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axes.boxplot + Axes.violinplot + + Axes.violin + Axes.bxp + +Binned +------ + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axes.hexbin + Axes.hist + Axes.hist2d + +Contours +-------- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axes.clabel + Axes.contour + Axes.contourf + +Array +----- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axes.imshow + Axes.matshow + Axes.pcolor + Axes.pcolorfast + Axes.pcolormesh + Axes.spy + +Unstructured Triangles +---------------------- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axes.tripcolor + Axes.triplot + Axes.tricontour + Axes.tricontourf + + +Text and Annotations +-------------------- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axes.annotate + Axes.text + Axes.table + Axes.arrow + + +Fields +------ + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axes.barbs + Axes.quiver + Axes.quiverkey + Axes.streamplot + + +Clearing +======== + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axes.cla + Axes.clear + + + +Appearance +========== + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + + Axes.axis + + Axes.set_axis_off + Axes.set_axis_on + Axes.set_frame_on + Axes.get_frame_on + + Axes.set_axisbelow + Axes.get_axisbelow + + Axes.grid + + Axes.get_axis_bgcolor + Axes.get_facecolor + Axes.get_fc + + Axes.set_facecolor + Axes.set_fc + Axes.set_axis_bgcolor + + + +Property cycle +============== + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axes.set_prop_cycle + Axes.set_color_cycle + + +Axis / limits +============= + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + + Axes.get_yaxis + Axes.get_xaxis + + + +Axis Limits and direction +------------------------- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axes.invert_xaxis + Axes.invert_yaxis + Axes.xaxis_inverted + Axes.yaxis_inverted + + Axes.set_xlim + Axes.set_ylim + Axes.get_ylim + Axes.get_xlim + + Axes.update_datalim + Axes.update_datalim_bounds + Axes.update_datalim_numerix + + Axes.set_ybound + Axes.set_xbound + Axes.get_ybound + Axes.get_xbound + +Axis Labels, title, and legend +------------------------------ + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axes.get_xlabel + Axes.get_ylabel + + Axes.set_xlabel + Axes.set_ylabel + + Axes.set_title + Axes.get_title + Axes.legend + Axes.get_legend + Axes.get_legend_handles_labels + + +Axis scales +----------- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axes.set_xscale + Axes.get_xscale + + Axes.get_yscale + Axes.set_yscale + + + +Autoscaling +----------- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axes.relim + + Axes.autoscale + Axes.autoscale_view + + Axes.get_autoscale_on + Axes.set_autoscale_on + + Axes.get_autoscalex_on + Axes.set_autoscalex_on + + Axes.get_autoscaley_on + Axes.set_autoscaley_on + + + +Margins +~~~~~~~ + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + + Axes.margins + Axes.set_margins + Axes.get_margins + Axes.bottom_margin + Axes.get_bottom_margin + Axes.get_left_margin + Axes.get_right_margin + Axes.get_top_margin + Axes.left_margin + Axes.right_margin + Axes.set_bottom_margin + Axes.set_left_margin + Axes.set_top_margin + Axes.set_right_margin + Axes.set_xmargin + Axes.top_margin + + +Aspect ratio +------------ + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axes.apply_aspect + Axes.get_aspect + Axes.set_aspect + + Axes.get_adjustable + Axes.set_adjustable + + +Ticks and tick labels +--------------------- + + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axes.xaxis_date + Axes.yaxis_date + + Axes.get_xmajorticklabels + Axes.get_xminorticklabels + Axes.get_xticklabels + Axes.get_xticklines + Axes.get_xticks + + Axes.get_ymajorticklabels + Axes.get_yminorticklabels + Axes.get_yticklabels + Axes.get_yticklines + Axes.get_yticks + + Axes.minorticks_off + Axes.minorticks_on + + Axes.set_xticklabels + Axes.set_xticks + Axes.set_ymargin + Axes.set_yticklabels + Axes.set_yticks + + Axes.get_xgridlines + Axes.get_ygridlines + + + Axes.ticklabel_format + Axes.tick_params + + Axes.locator_params + + + +Units +===== + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axes.convert_xunits + Axes.convert_yunits + Axes.have_units + + +Adding Artists +============== + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axes.add_artist + Axes.add_collection + Axes.add_container + Axes.add_image + Axes.add_line + Axes.add_patch + Axes.add_table + + +Twinning +======== + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axes.twinx + Axes.twiny + + Axes.get_shared_x_axes + Axes.get_shared_y_axes + + +Axes Position +============= +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axes.get_anchor + Axes.set_anchor + + Axes.get_axes_locator + Axes.set_axes_locator + + Axes.reset_position + + Axes.get_position + Axes.set_position + + +Async/Event based +================= + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axes.stale + Axes.pchanged + Axes.add_callback + Axes.remove_callback + + +Interactive +=========== + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + + Axes.can_pan + Axes.can_zoom + + Axes.get_navigate + Axes.set_navigate + Axes.get_navigate_mode + Axes.set_navigate_mode + + Axes.start_pan + Axes.drag_pan + Axes.end_pan + + Axes.format_coord + Axes.format_cursor_data + Axes.format_xdata + Axes.format_ydata + + Axes.hitlist + Axes.mouseover + Axes.in_axes + + Axes.pick + Axes.pickable + Axes.get_picker + Axes.set_picker + + Axes.set_contains + Axes.get_contains + + Axes.contains + Axes.contains_point + + Axes.get_cursor_data + Axes.get_cursor_props + Axes.set_cursor_props + +Children +======== + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axes.get_children + Axes.get_images + Axes.get_lines + Axes.findobj + + +Drawing +======= + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axes.draw + Axes.draw_artist + Axes.redraw_in_frame + Axes.get_renderer_cache + + Axes.get_rasterization_zorder + Axes.set_rasterization_zorder + + Axes.get_window_extent + Axes.get_tightbbox + + +Bulk property manipulation +========================== + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axes.set + Axes.update + Axes.properties + Axes.update_from + + +General Artist Properties +========================= + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axes.set_alpha + Axes.set_animated + Axes.set_clip_box + Axes.set_clip_on + Axes.set_clip_path + Axes.set_gid + Axes.set_label + Axes.set_url + Axes.set_visible + Axes.set_zorder + Axes.set_rasterized + Axes.set_sketch_params + Axes.set_agg_filter + Axes.set_snap + Axes.set_transform + Axes.set_path_effects + + Axes.get_agg_filter + Axes.get_sketch_params + Axes.get_alpha + Axes.get_animated + Axes.get_clip_box + Axes.get_clip_on + Axes.get_clip_path + Axes.get_gid + Axes.get_label + Axes.get_url + Axes.get_visible + Axes.get_zorder + Axes.get_rasterized + Axes.get_transform + Axes.get_snap + Axes.get_path_effects + + + Axes.axes + Axes.get_axes + Axes.set_axes + Axes.set_figure + Axes.get_figure + +Artist Methods +============== + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axes.is_figure_set + Axes.remove + Axes.is_transform_set + + +Projection +========== + +Methods used by `~matplotlib.axis.Axis` that must be overridden for +non-rectilinear Axes. + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axes.name + Axes.get_xaxis_transform + Axes.get_yaxis_transform + Axes.get_data_ratio + Axes.get_data_ratio_log + + Axes.get_xaxis_text1_transform + Axes.get_xaxis_text2_transform + Axes.get_yaxis_text1_transform + Axes.get_yaxis_text2_transform + + +Other +===== + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axes.zorder + Axes.aname + Axes.get_default_bbox_extra_artists + Axes.get_transformed_clip_path_and_affine + Axes.has_data + Axes.hold + Axes.ishold + + +Inheritance +=========== +.. inheritance-diagram:: matplotlib.axes.Axes + :private-bases: diff --git a/doc/api/axis_api.rst b/doc/api/axis_api.rst index 426f0c873dfb..287fa94fa015 100644 --- a/doc/api/axis_api.rst +++ b/doc/api/axis_api.rst @@ -1,12 +1,954 @@ -**** -axis -**** +=================== + axis and tick API +=================== - -:mod:`matplotlib.axis` -====================== +.. contents:: Table of Contents + :depth: 3 + :local: + :backlinks: entry .. automodule:: matplotlib.axis - :members: - :undoc-members: - :show-inheritance: + +Inheritance +=========== + +.. inheritance-diagram:: Tick Ticker XAxis YAxis XTick YTick + :private-bases: + + +``Axis`` objects +================ + +.. autoclass:: Axis +.. autoclass:: XAxis +.. autoclass:: YAxis +.. autoclass:: Ticker + + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axis.cla + Axis.get_scale + + +Formatters and Locators +----------------------- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axis.get_major_formatter + Axis.get_major_locator + Axis.get_minor_formatter + Axis.get_minor_locator + Axis.set_major_formatter + Axis.set_major_locator + Axis.set_minor_formatter + Axis.set_minor_locator + + +Axis Label +---------- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axis.set_label_coords + Axis.set_label_position + Axis.set_label_text + Axis.get_label_position + Axis.get_label_text + +Ticks, tick labels and Offset text +---------------------------------- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axis.get_major_ticks + Axis.get_majorticklabels + Axis.get_majorticklines + Axis.get_majorticklocs + Axis.get_minor_ticks + Axis.get_minorticklabels + Axis.get_minorticklines + Axis.get_minorticklocs + + Axis.get_offset_text + + Axis.get_tick_padding + Axis.get_ticklabels + Axis.get_ticklines + Axis.get_ticklocs + + Axis.get_gridlines + Axis.grid + + Axis.iter_ticks + Axis.set_tick_params + + Axis.axis_date + + +Data and view internvals +------------------------ + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axis.get_data_interval + Axis.get_view_interval + Axis.set_data_interval + Axis.set_view_interval + +Rendering helpers +----------------- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axis.get_minpos + Axis.get_tick_space + Axis.get_ticklabel_extents + Axis.get_tightbbox + + +Interactive +----------- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + + Axis.get_pickradius + Axis.set_pickradius + + +Units +----- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axis.convert_units + Axis.set_units + Axis.get_units + Axis.update_units + + +Incremental navigation +---------------------- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axis.pan + Axis.zoom + + +YAxis Specific +-------------- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + YAxis.axis_name + YAxis.get_text_widths + YAxis.get_ticks_position + YAxis.set_offset_position + YAxis.set_ticks_position + YAxis.tick_left + YAxis.tick_right + + +XAxis Specific +-------------- +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + XAxis.axis_name + XAxis.get_text_heights + XAxis.get_ticks_position + XAxis.set_ticks_position + XAxis.tick_bottom + XAxis.tick_top + + +Other +----- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + + Axis.OFFSETTEXTPAD + + Axis.limit_range_for_scale + Axis.reset_ticks + Axis.set_default_intervals + Axis.get_smart_bounds + Axis.set_smart_bounds + +Discouraged +----------- + +These methods implicitly use `~matplotlib.ticker.FixedLocator` and +`~matplotlib.ticker.FixedFormatter`. They can be convenient, but if +not used together may de-couple your tick labels from your data. + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Axis.set_ticklabels + Axis.set_ticks + + + +``Tick`` objects +================ + +.. autoclass:: Tick +.. autoclass:: XTick +.. autoclass:: YTick + + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + + Tick.apply_tickdir + Tick.get_loc + Tick.get_pad + Tick.get_pad_pixels + Tick.get_tick_padding + Tick.get_tickdir + Tick.get_view_interval + Tick.set_label1 + Tick.set_label2 + Tick.set_pad + Tick.update_position + + +Common and inherited methods +============================ + +``XTick`` +--------- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + XTick.apply_tickdir + XTick.get_loc + XTick.get_pad + XTick.get_pad_pixels + XTick.get_tick_padding + XTick.get_tickdir + XTick.get_view_interval + XTick.set_label1 + XTick.set_label2 + XTick.set_pad + XTick.update_position + + + +YTick +----- + + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + YTick.apply_tickdir + YTick.get_loc + YTick.get_pad + YTick.get_pad_pixels + YTick.get_tick_padding + YTick.get_tickdir + YTick.get_view_interval + YTick.set_label1 + YTick.set_label2 + YTick.set_pad + YTick.update_position + +YAxis +----- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + + + YAxis.OFFSETTEXTPAD + YAxis.axis_date + YAxis.cla + YAxis.convert_units + YAxis.get_data_interval + YAxis.get_gridlines + YAxis.get_label_position + YAxis.get_label_text + YAxis.get_major_formatter + YAxis.get_major_locator + YAxis.get_major_ticks + YAxis.get_majorticklabels + YAxis.get_majorticklines + YAxis.get_majorticklocs + YAxis.get_minor_formatter + YAxis.get_minor_locator + YAxis.get_minor_ticks + YAxis.get_minorticklabels + YAxis.get_minorticklines + YAxis.get_minorticklocs + YAxis.get_minpos + YAxis.get_offset_text + YAxis.get_pickradius + YAxis.get_scale + YAxis.get_smart_bounds + YAxis.get_tick_padding + YAxis.get_tick_space + YAxis.get_ticklabel_extents + YAxis.get_ticklabels + YAxis.get_ticklines + YAxis.get_ticklocs + YAxis.get_tightbbox + YAxis.get_units + YAxis.get_view_interval + YAxis.grid + YAxis.iter_ticks + YAxis.limit_range_for_scale + YAxis.pan + YAxis.reset_ticks + YAxis.set_data_interval + YAxis.set_default_intervals + YAxis.set_label_coords + YAxis.set_label_position + YAxis.set_label_text + YAxis.set_major_formatter + YAxis.set_major_locator + YAxis.set_minor_formatter + YAxis.set_minor_locator + YAxis.set_pickradius + YAxis.set_smart_bounds + YAxis.set_tick_params + YAxis.set_ticklabels + YAxis.set_ticks + YAxis.set_units + YAxis.set_view_interval + YAxis.update_units + YAxis.zoom + +``YAxis`` +--------- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + + XAxis.OFFSETTEXTPAD + XAxis.axis_date + XAxis.cla + XAxis.convert_units + XAxis.get_data_interval + XAxis.get_gridlines + XAxis.get_label_position + XAxis.get_label_text + XAxis.get_major_formatter + XAxis.get_major_locator + XAxis.get_major_ticks + XAxis.get_majorticklabels + XAxis.get_majorticklines + XAxis.get_majorticklocs + XAxis.get_minor_formatter + XAxis.get_minor_locator + XAxis.get_minor_ticks + XAxis.get_minorticklabels + XAxis.get_minorticklines + XAxis.get_minorticklocs + XAxis.get_minpos + XAxis.get_offset_text + XAxis.get_pickradius + XAxis.get_scale + XAxis.get_smart_bounds + XAxis.get_tick_padding + XAxis.get_tick_space + XAxis.get_ticklabel_extents + XAxis.get_ticklabels + XAxis.get_ticklines + XAxis.get_ticklocs + XAxis.get_tightbbox + XAxis.get_units + XAxis.get_view_interval + XAxis.grid + XAxis.iter_ticks + XAxis.limit_range_for_scale + XAxis.pan + XAxis.reset_ticks + XAxis.set_data_interval + XAxis.set_default_intervals + XAxis.set_label_coords + XAxis.set_label_position + XAxis.set_label_text + XAxis.set_major_formatter + XAxis.set_major_locator + XAxis.set_minor_formatter + XAxis.set_minor_locator + XAxis.set_pickradius + XAxis.set_smart_bounds + XAxis.set_tick_params + XAxis.set_ticklabels + XAxis.set_ticks + XAxis.set_units + XAxis.set_view_interval + XAxis.update_units + XAxis.zoom + + + +Inherited from artist +--------------------- + +Ticks +~~~~~ + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + + Tick.add_callback + Tick.aname + Tick.axes + Tick.bottom_margin + Tick.contains + Tick.convert_xunits + Tick.convert_yunits + Tick.draw + Tick.findobj + Tick.format_cursor_data + Tick.get_agg_filter + Tick.get_alpha + Tick.get_animated + Tick.get_axes + Tick.get_bottom_margin + Tick.get_children + Tick.get_clip_box + Tick.get_clip_on + Tick.get_clip_path + Tick.get_contains + Tick.get_cursor_data + Tick.get_figure + Tick.get_gid + Tick.get_label + Tick.get_left_margin + Tick.get_margins + Tick.get_path_effects + Tick.get_picker + Tick.get_rasterized + Tick.get_right_margin + Tick.get_sketch_params + Tick.get_snap + Tick.get_top_margin + Tick.get_transform + Tick.get_transformed_clip_path_and_affine + Tick.get_url + Tick.get_visible + Tick.get_window_extent + Tick.get_zorder + Tick.have_units + Tick.hitlist + Tick.is_figure_set + Tick.is_transform_set + Tick.left_margin + Tick.margins + Tick.mouseover + Tick.pchanged + Tick.pick + Tick.pickable + Tick.properties + Tick.remove + Tick.remove_callback + Tick.right_margin + Tick.set + Tick.set_agg_filter + Tick.set_alpha + Tick.set_animated + Tick.set_axes + Tick.set_bottom_margin + Tick.set_clip_box + Tick.set_clip_on + Tick.set_clip_path + Tick.set_contains + Tick.set_figure + Tick.set_gid + Tick.set_label + Tick.set_left_margin + Tick.set_margins + Tick.set_path_effects + Tick.set_picker + Tick.set_rasterized + Tick.set_right_margin + Tick.set_sketch_params + Tick.set_snap + Tick.set_top_margin + Tick.set_transform + Tick.set_url + Tick.set_visible + Tick.set_zorder + Tick.stale + Tick.top_margin + Tick.update + Tick.update_from + Tick.zorder + + XTick.add_callback + XTick.aname + XTick.axes + XTick.bottom_margin + XTick.contains + XTick.convert_xunits + XTick.convert_yunits + XTick.draw + XTick.findobj + XTick.format_cursor_data + XTick.get_agg_filter + XTick.get_alpha + XTick.get_animated + XTick.get_axes + XTick.get_bottom_margin + XTick.get_children + XTick.get_clip_box + XTick.get_clip_on + XTick.get_clip_path + XTick.get_contains + XTick.get_cursor_data + XTick.get_figure + XTick.get_gid + XTick.get_label + XTick.get_left_margin + XTick.get_margins + XTick.get_path_effects + XTick.get_picker + XTick.get_rasterized + XTick.get_right_margin + XTick.get_sketch_params + XTick.get_snap + XTick.get_top_margin + XTick.get_transform + XTick.get_transformed_clip_path_and_affine + XTick.get_url + XTick.get_visible + XTick.get_window_extent + XTick.get_zorder + XTick.have_units + XTick.hitlist + XTick.is_figure_set + XTick.is_transform_set + XTick.left_margin + XTick.margins + XTick.mouseover + XTick.pchanged + XTick.pick + XTick.pickable + XTick.properties + XTick.remove + XTick.remove_callback + XTick.right_margin + XTick.set + XTick.set_agg_filter + XTick.set_alpha + XTick.set_animated + XTick.set_axes + XTick.set_bottom_margin + XTick.set_clip_box + XTick.set_clip_on + XTick.set_clip_path + XTick.set_contains + XTick.set_figure + XTick.set_gid + XTick.set_label + XTick.set_left_margin + XTick.set_margins + XTick.set_path_effects + XTick.set_picker + XTick.set_rasterized + XTick.set_right_margin + XTick.set_sketch_params + XTick.set_snap + XTick.set_top_margin + XTick.set_transform + XTick.set_url + XTick.set_visible + XTick.set_zorder + XTick.stale + XTick.top_margin + XTick.update + XTick.update_from + XTick.zorder + + YTick.add_callback + YTick.aname + YTick.axes + YTick.bottom_margin + YTick.contains + YTick.convert_xunits + YTick.convert_yunits + YTick.draw + YTick.findobj + YTick.format_cursor_data + YTick.get_agg_filter + YTick.get_alpha + YTick.get_animated + YTick.get_axes + YTick.get_bottom_margin + YTick.get_children + YTick.get_clip_box + YTick.get_clip_on + YTick.get_clip_path + YTick.get_contains + YTick.get_cursor_data + YTick.get_figure + YTick.get_gid + YTick.get_label + YTick.get_left_margin + YTick.get_margins + YTick.get_path_effects + YTick.get_picker + YTick.get_rasterized + YTick.get_right_margin + YTick.get_sketch_params + YTick.get_snap + YTick.get_top_margin + YTick.get_transform + YTick.get_transformed_clip_path_and_affine + YTick.get_url + YTick.get_visible + YTick.get_window_extent + YTick.get_zorder + YTick.have_units + YTick.hitlist + YTick.is_figure_set + YTick.is_transform_set + YTick.left_margin + YTick.margins + YTick.mouseover + YTick.pchanged + YTick.pick + YTick.pickable + YTick.properties + YTick.remove + YTick.remove_callback + YTick.right_margin + YTick.set + YTick.set_agg_filter + YTick.set_alpha + YTick.set_animated + YTick.set_axes + YTick.set_bottom_margin + YTick.set_clip_box + YTick.set_clip_on + YTick.set_clip_path + YTick.set_contains + YTick.set_figure + YTick.set_gid + YTick.set_label + YTick.set_left_margin + YTick.set_margins + YTick.set_path_effects + YTick.set_picker + YTick.set_rasterized + YTick.set_right_margin + YTick.set_sketch_params + YTick.set_snap + YTick.set_top_margin + YTick.set_transform + YTick.set_url + YTick.set_visible + YTick.set_zorder + YTick.stale + YTick.top_margin + YTick.update + YTick.update_from + YTick.zorder + + +Axis +~~~~ + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + + Axis.add_callback + Axis.aname + Axis.axes + Axis.bottom_margin + Axis.contains + Axis.convert_xunits + Axis.convert_yunits + Axis.draw + Axis.findobj + Axis.format_cursor_data + Axis.get_agg_filter + Axis.get_alpha + Axis.get_animated + Axis.get_axes + Axis.get_bottom_margin + Axis.get_children + Axis.get_clip_box + Axis.get_clip_on + Axis.get_clip_path + Axis.get_contains + Axis.get_cursor_data + Axis.get_figure + Axis.get_gid + Axis.get_label + Axis.get_left_margin + Axis.get_margins + Axis.get_path_effects + Axis.get_picker + Axis.get_rasterized + Axis.get_right_margin + Axis.get_sketch_params + Axis.get_snap + Axis.get_top_margin + Axis.get_transform + Axis.get_transformed_clip_path_and_affine + Axis.get_url + Axis.get_visible + Axis.get_window_extent + Axis.get_zorder + Axis.have_units + Axis.hitlist + Axis.is_figure_set + Axis.is_transform_set + Axis.left_margin + Axis.margins + Axis.mouseover + Axis.pchanged + Axis.pick + Axis.pickable + Axis.properties + Axis.remove + Axis.remove_callback + Axis.right_margin + Axis.set + Axis.set_agg_filter + Axis.set_alpha + Axis.set_animated + Axis.set_axes + Axis.set_bottom_margin + Axis.set_clip_box + Axis.set_clip_on + Axis.set_clip_path + Axis.set_contains + Axis.set_figure + Axis.set_gid + Axis.set_label + Axis.set_left_margin + Axis.set_margins + Axis.set_path_effects + Axis.set_picker + Axis.set_rasterized + Axis.set_right_margin + Axis.set_sketch_params + Axis.set_snap + Axis.set_top_margin + Axis.set_transform + Axis.set_url + Axis.set_visible + Axis.set_zorder + Axis.stale + Axis.top_margin + Axis.update + Axis.update_from + Axis.zorder + + XAxis.add_callback + XAxis.aname + XAxis.axes + XAxis.bottom_margin + XAxis.contains + XAxis.convert_xunits + XAxis.convert_yunits + XAxis.draw + XAxis.findobj + XAxis.format_cursor_data + XAxis.get_agg_filter + XAxis.get_alpha + XAxis.get_animated + XAxis.get_axes + XAxis.get_bottom_margin + XAxis.get_children + XAxis.get_clip_box + XAxis.get_clip_on + XAxis.get_clip_path + XAxis.get_contains + XAxis.get_cursor_data + XAxis.get_figure + XAxis.get_gid + XAxis.get_label + XAxis.get_left_margin + XAxis.get_margins + XAxis.get_path_effects + XAxis.get_picker + XAxis.get_rasterized + XAxis.get_right_margin + XAxis.get_sketch_params + XAxis.get_snap + XAxis.get_top_margin + XAxis.get_transform + XAxis.get_transformed_clip_path_and_affine + XAxis.get_url + XAxis.get_visible + XAxis.get_window_extent + XAxis.get_zorder + XAxis.have_units + XAxis.hitlist + XAxis.is_figure_set + XAxis.is_transform_set + XAxis.left_margin + XAxis.margins + XAxis.mouseover + XAxis.pchanged + XAxis.pick + XAxis.pickable + XAxis.properties + XAxis.remove + XAxis.remove_callback + XAxis.right_margin + XAxis.set + XAxis.set_agg_filter + XAxis.set_alpha + XAxis.set_animated + XAxis.set_axes + XAxis.set_bottom_margin + XAxis.set_clip_box + XAxis.set_clip_on + XAxis.set_clip_path + XAxis.set_contains + XAxis.set_figure + XAxis.set_gid + XAxis.set_label + XAxis.set_left_margin + XAxis.set_margins + XAxis.set_path_effects + XAxis.set_picker + XAxis.set_rasterized + XAxis.set_right_margin + XAxis.set_sketch_params + XAxis.set_snap + XAxis.set_top_margin + XAxis.set_transform + XAxis.set_url + XAxis.set_visible + XAxis.set_zorder + XAxis.stale + XAxis.top_margin + XAxis.update + XAxis.update_from + XAxis.zorder + + YAxis.add_callback + YAxis.aname + YAxis.axes + YAxis.bottom_margin + YAxis.contains + YAxis.convert_xunits + YAxis.convert_yunits + YAxis.draw + YAxis.findobj + YAxis.format_cursor_data + YAxis.get_agg_filter + YAxis.get_alpha + YAxis.get_animated + YAxis.get_axes + YAxis.get_bottom_margin + YAxis.get_children + YAxis.get_clip_box + YAxis.get_clip_on + YAxis.get_clip_path + YAxis.get_contains + YAxis.get_cursor_data + YAxis.get_figure + YAxis.get_gid + YAxis.get_label + YAxis.get_left_margin + YAxis.get_margins + YAxis.get_path_effects + YAxis.get_picker + YAxis.get_rasterized + YAxis.get_right_margin + YAxis.get_sketch_params + YAxis.get_snap + YAxis.get_top_margin + YAxis.get_transform + YAxis.get_transformed_clip_path_and_affine + YAxis.get_url + YAxis.get_visible + YAxis.get_window_extent + YAxis.get_zorder + YAxis.have_units + YAxis.hitlist + YAxis.is_figure_set + YAxis.is_transform_set + YAxis.left_margin + YAxis.margins + YAxis.mouseover + YAxis.pchanged + YAxis.pick + YAxis.pickable + YAxis.properties + YAxis.remove + YAxis.remove_callback + YAxis.right_margin + YAxis.set + YAxis.set_agg_filter + YAxis.set_alpha + YAxis.set_animated + YAxis.set_axes + YAxis.set_bottom_margin + YAxis.set_clip_box + YAxis.set_clip_on + YAxis.set_clip_path + YAxis.set_contains + YAxis.set_figure + YAxis.set_gid + YAxis.set_label + YAxis.set_left_margin + YAxis.set_margins + YAxis.set_path_effects + YAxis.set_picker + YAxis.set_rasterized + YAxis.set_right_margin + YAxis.set_sketch_params + YAxis.set_snap + YAxis.set_top_margin + YAxis.set_transform + YAxis.set_url + YAxis.set_visible + YAxis.set_zorder + YAxis.stale + YAxis.top_margin + YAxis.update + YAxis.update_from + YAxis.zorder diff --git a/lib/matplotlib/artist.py b/lib/matplotlib/artist.py index 1e03c1f9a451..72192d247473 100644 --- a/lib/matplotlib/artist.py +++ b/lib/matplotlib/artist.py @@ -426,7 +426,8 @@ def pickable(self): self._picker is not None) def pick(self, mouseevent): - """ + """Process pick event + call signature:: pick(mouseevent) diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index 755b3839b0de..4a1780fcd37e 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -107,6 +107,8 @@ class Axes(_AxesBase): """ ### Labelling, legend and texts + aname = 'Axes' + def get_title(self, loc="center"): """Get an axes title. diff --git a/lib/matplotlib/axes/_base.py b/lib/matplotlib/axes/_base.py index 0feb87e757d1..ce216d87d56c 100644 --- a/lib/matplotlib/axes/_base.py +++ b/lib/matplotlib/axes/_base.py @@ -844,8 +844,9 @@ def get_position(self, original=False): return self._position.frozen() def set_position(self, pos, which='both'): - """ - Set the axes position with:: + """Set the axes position + + The expected shape of ``pos`` is:: pos = [left, bottom, width, height] @@ -1188,13 +1189,14 @@ def ishold(self): return self._hold def hold(self, b=None): - """ + """Set the hold state + Call signature:: hold(b=None) - Set the hold state. If *hold* is *None* (default), toggle the - *hold* state. Else set the *hold* state to boolean value *b*. + If *hold* is *None* (default), toggle the *hold* state. Else + set the *hold* state to boolean value *b*. Examples:: @@ -2615,58 +2617,66 @@ def locator_params(self, axis='both', tight=None, **kwargs): self.autoscale_view(tight=tight, scalex=_x, scaley=_y) def tick_params(self, axis='both', **kwargs): - """ - Change the appearance of ticks and tick labels. + """Change the appearance of ticks and tick labels. - Keyword arguments: + Parameters + ---------- + axis : {'x', 'y', 'both'}, optional + Which axis to apply the parameters to. - *axis* : ['x' | 'y' | 'both'] + Other Parameters + ---------------- + + axis : {'x', 'y', 'both'} Axis on which to operate; default is 'both'. - *reset* : [True | False] + reset : bool If *True*, set all parameters to defaults before processing other keyword arguments. Default is *False*. - *which* : ['major' | 'minor' | 'both'] + which : {'major', 'minor', 'both'} Default is 'major'; apply arguments to *which* ticks. - *direction* : ['in' | 'out' | 'inout'] + direction : {'in', 'out', 'inout'} Puts ticks inside the axes, outside the axes, or both. - *length* + length : float Tick length in points. - *width* + width : float Tick width in points. - *color* + color : color Tick color; accepts any mpl color spec. - *pad* + pad : float Distance in points between tick and label. - *labelsize* + labelsize : float or str Tick label font size in points or as a string (e.g., 'large'). - *labelcolor* + labelcolor : color Tick label color; mpl color spec. - *colors* + colors : color Changes the tick color and the label color to the same value: mpl color spec. - *zorder* + zorder : float Tick and label zorder. - *bottom*, *top*, *left*, *right* : [bool | 'on' | 'off'] + bottom, top, left, right : bool or {'on', 'off'} controls whether to draw the respective ticks. - *labelbottom*, *labeltop*, *labelleft*, *labelright* - Boolean or ['on' | 'off'], controls whether to draw the + labelbottom, labeltop, labelleft, labelright : bool or {'on', 'off'} + controls whether to draw the respective tick labels. - Example:: + Examples + -------- + + Usage :: ax.tick_params(direction='out', length=6, width=2, colors='r') @@ -2727,11 +2737,16 @@ def xaxis_inverted(self): return right < left def get_xbound(self): - """ - Returns the x-axis numerical bounds where:: + """Returns the x-axis numerical bounds + + This always returns:: lowerBound < upperBound + Returns + ------- + lowerBound, upperBound : float + """ left, right = self.get_xlim() if left < right: @@ -2773,7 +2788,8 @@ def get_xlim(self): return tuple(self.viewLim.intervalx) def set_xlim(self, left=None, right=None, emit=True, auto=False, **kw): - """ + """Set the data limits for the xaxis + Call signature:: set_xlim(self, *args, **kwargs): @@ -2871,7 +2887,8 @@ def get_xscale(self): @docstring.dedent_interpd def set_xscale(self, value, **kwargs): - """ + """Set the x-axis scale + Call signature:: set_xscale(value) @@ -2953,12 +2970,13 @@ def get_xticklabels(self, minor=False, which=None): @docstring.dedent_interpd def set_xticklabels(self, labels, fontdict=None, minor=False, **kwargs): - """ + """Set the xtick labels with list of strings *labels* + Call signature:: set_xticklabels(labels, fontdict=None, minor=False, **kwargs) - Set the xtick labels with list of strings *labels*. Return a + Return a list of axis text instances. *kwargs* set the :class:`~matplotlib.text.Text` properties. @@ -3031,13 +3049,12 @@ def get_ylim(self): return tuple(self.viewLim.intervaly) def set_ylim(self, bottom=None, top=None, emit=True, auto=False, **kw): - """ + """Set the data limits for the yaxis + Call signature:: set_ylim(self, *args, **kwargs): - Set the data limits for the yaxis - Examples:: set_ylim((bottom, top)) @@ -3130,7 +3147,8 @@ def get_yscale(self): @docstring.dedent_interpd def set_yscale(self, value, **kwargs): - """ + """Set the y-axis scale + Call signature:: set_yscale(value) @@ -3215,12 +3233,13 @@ def get_yticklabels(self, minor=False, which=None): @docstring.dedent_interpd def set_yticklabels(self, labels, fontdict=None, minor=False, **kwargs): - """ + """Set the y tick labels with list of strings *labels* + Call signature:: set_yticklabels(labels, fontdict=None, minor=False, **kwargs) - Set the y tick labels with list of strings *labels*. Return a list of + Return a list of :class:`~matplotlib.text.Text` instances. *kwargs* set :class:`~matplotlib.text.Text` properties for the labels. @@ -3626,8 +3645,9 @@ def get_cursor_props(self): return self._cursorProps def set_cursor_props(self, *args): - """ - Set the cursor property as:: + """Set the cursor property as + + Call signature :: ax.set_cursor_props(linewidth, color) @@ -3688,7 +3708,8 @@ def contains_point(self, point): return self.patch.contains_point(point, radius=1.0) def pick(self, *args): - """ + """Trigger pick event + Call signature:: pick(mouseevent) @@ -3760,7 +3781,8 @@ def _make_twin_axes(self, *kl, **kwargs): return ax2 def twinx(self): - """ + """Create a twin Axes sharing the xaxis + Call signature:: ax = twinx() @@ -3785,7 +3807,8 @@ def twinx(self): return ax2 def twiny(self): - """ + """Create a twin Axes sharing the yaxis + Call signature:: ax = twiny() diff --git a/lib/matplotlib/axis.py b/lib/matplotlib/axis.py index 14ce5a4c0dc2..1167f4161d25 100644 --- a/lib/matplotlib/axis.py +++ b/lib/matplotlib/axis.py @@ -340,6 +340,10 @@ def _apply_params(self, **kw): v = getattr(self.label1, 'get_' + k)() setattr(self, '_label' + k, v) + def update_position(self, loc): + 'Set the location of tick in data coords with scalar *loc*' + raise NotImplementedError('Derived must override') + class XTick(Tick): """ @@ -1670,6 +1674,23 @@ def get_tick_space(self): # Must be overridden in the subclass raise NotImplementedError() + def get_label_position(self): + """ + Return the label position (top or bottom) + """ + return self.label_position + + def set_label_position(self, position): + """ + Set the label position (top or bottom) + + ACCEPTS: [ 'top' | 'bottom' ] + """ + raise NotImplementedError() + + def get_minpos(self): + raise NotImplementedError() + class XAxis(Axis): __name__ = 'xaxis' @@ -1769,12 +1790,6 @@ def _get_pixel_distance_along_axis(self, where, perturb): return dx - def get_label_position(self): - """ - Return the label position (top or bottom) - """ - return self.label_position - def set_label_position(self, position): """ Set the label position (top or bottom) @@ -2098,12 +2113,6 @@ def _get_pixel_distance_along_axis(self, where, perturb): dy = abs(ptp[1] - where) return dy - def get_label_position(self): - """ - Return the label position (left or right) - """ - return self.label_position - def set_label_position(self, position): """ Set the label position (left or right) diff --git a/lib/matplotlib/collections.py b/lib/matplotlib/collections.py index 5f602151f1a6..3fcef3879469 100644 --- a/lib/matplotlib/collections.py +++ b/lib/matplotlib/collections.py @@ -655,7 +655,6 @@ def _set_facecolor(self, c): self._facecolors = mcolors.to_rgba_array(c, self._alpha) self.stale = True - def set_facecolor(self, c): """ Set the facecolor(s) of the collection. *c* can be a @@ -670,7 +669,6 @@ def set_facecolor(self, c): self._original_facecolor = c self._set_facecolor(c) - def set_facecolors(self, c): """alias for set_facecolor""" return self.set_facecolor(c)