您的位置:首页 > 编程语言 > PHP开发

matplotlib命令与格式:tick刻度对象命令合集

2017-12-06 23:30 489 查看
详细参考官方文档:http://matplotlib.org/api/axis_api.html

Tick objects
classmatplotlib.axis.Tick(axes,loc,label,size=None,width=None,color=None,tickdir=None,pad=None,labelsize=None,labelcolor=None,zorder=None,gridOn=None,tick1On=True,tick2On=True,label1On=True,label2On=False,major=True,labelrotation=0)
Abstract base class for the axis ticks, grid lines and labels
1 refers to the bottom of the plot for xticks and the left for yticks2 refers to the top of the plot for xticks and the right for yticks
Publicly accessible attributes:

tick1line

a Line2D instance

tick2line

a Line2D instance

gridline

a Line2D instance

label1

a Text instance

label2

a Text instance

gridOn

a boolean which determines whether to draw the tickline

tick1On

a boolean which determines whether to draw the 1st tickline

tick2On

a boolean which determines whether to draw the 2nd tickline

label1On

a boolean which determines whether to draw tick label

label2On

a boolean which determines whether to draw tick label
bbox is the Bound2D bounding box in display coords of the Axes
4000
loc is the tick location in data coordssize is the tick size in points

classmatplotlib.axis.XTick(axes,loc,label,size=None,width=None,color=None,tickdir=None,pad=None,labelsize=None,labelcolor=None,zorder=None,gridOn=None,tick1On=True,tick2On=True,label1On=True,label2On=False,major=True,labelrotation=0)
Contains all the Artists needed to make an x tick - the tick line,the label text and the grid line
bbox is the Bound2D bounding box in display coords of the Axesloc is the tick location in data coordssize is the tick size in points

classmatplotlib.axis.YTick(axes,loc,label,size=None,width=None,color=None,tickdir=None,pad=None,labelsize=None,labelcolor=None,zorder=None,gridOn=None,tick1On=True,tick2On=True,label1On=True,label2On=False,major=True,labelrotation=0)
Contains all the Artists needed to make a Y tick - the tick line,the label text and the grid line
bbox is the Bound2D bounding box in display coords of the Axesloc is the tick location in data coordssize is the tick size in points

Tick.apply_tickdir
Calculate self._pad and self._tickmarkers
Tick.get_loc
Return the tick location (data coords) as a scalar
Tick.get_pad
Get the value of the tick label pad in points
Tick.get_pad_pixels
 
Tick.get_tick_padding
Get the length of the tick outside of the axes.
Tick.get_tickdir
 
Tick.get_view_interval
return the view Interval instance for the axis this tick is ticking
Tick.set_label1
Set the text of ticklabel
Common and inherited methods
XTick

XTick.apply_tickdir
 
XTick.get_loc
Return the tick location (data coords) as a scalar
XTick.get_pad
Get the value of the tick label pad in points
XTick.get_pad_pixels
 
XTick.get_tick_padding
Get the length of the tick outside of the axes.
XTick.get_tickdir
 
XTick.get_view_interval
return the Interval instance for this axis view limits
XTick.set_label1
Set the text of ticklabel
YTick

YTick.apply_tickdir
 
YTick.get_loc
Return the tick location (data coords) as a scalar
YTick.get_pad
Get the value of the tick label pad in points
YTick.get_pad_pixels
 
YTick.get_tick_padding
Get the length of the tick outside of the axes.
YTick.get_tickdir
 
YTick.get_view_interval
return the Interval instance for this axis view limits
YTick.set_label1
Set the text of ticklabel
YAxis

YAxis.OFFSETTEXTPAD
 
YAxis.axis_date
Sets up x-axis ticks and labels that treat the x data as dates.
YAxis.cla
clear the current axis
YAxis.convert_units
 
YAxis.get_data_interval
return the Interval instance for this axis data limits
YAxis.get_gridlines
Return the grid lines as a list of Line2D instance
YAxis.get_label_position
Return the label position (top or bottom)
YAxis.get_label_text
Get the text of the label
YAxis.get_major_formatter
Get the formatter of the major ticker
YAxis.get_major_locator
Get the locator of the major ticker
YAxis.get_major_ticks
get the tick instances; grow as necessary
YAxis.get_majorticklabels
Return a list of Text instances for the major ticklabels
YAxis.get_majorticklines
Return the major tick lines as a list of Line2D instances
YAxis.get_majorticklocs
Get the major tick locations in data coordinates as a numpy array
YAxis.get_minor_formatter
Get the formatter of the minor ticker
YAxis.get_minor_locator
Get the locator of the minor ticker
YAxis.get_minor_ticks
get the minor tick instances; grow as necessary
YAxis.get_minorticklabels
Return a list of Text instances for the minor ticklabels
YAxis.get_minorticklines
Return the minor tick lines as a list of Line2D instances
YAxis.get_minorticklocs
Get the minor tick locations in data coordinates as a numpy array
YAxis.get_minpos
 
YAxis.get_offset_text
Return the axis offsetText as a Text instance
YAxis.get_pickradius
Return the depth of the axis used by the picker
YAxis.get_scale
 
YAxis

XAxis.OFFSETTEXTPAD
 
XAxis.axis_date
Sets up x-axis ticks and labels that treat the x data as dates.
XAxis.cla
clear the current axis
XAxis.convert_units
 
XAxis.get_data_interval
return the Interval instance for this axis data limits
XAxis.get_gridlines
Return the grid lines as a list of Line2D instance
XAxis.get_label_position
Return the label position (top or bottom)
XAxis.get_label_text
Get the text of the label
XAxis.get_major_formatter
Get the formatter of the major ticker
XAxis.get_major_locator
Get the locator of the major ticker
XAxis.get_major_ticks
get the tick instances; grow as necessary
XAxis.get_majorticklabels
Return a list of Text instances for the major ticklabels
XAxis.get_majorticklines
Return the major tick lines as a list of Line2D instances
XAxis.get_majorticklocs
Get the major tick locations in data coordinates as a numpy array
XAxis.get_minor_formatter
Get the formatter of the minor ticker
XAxis.get_minor_locator
Get the locator of the minor ticker
XAxis.get_minor_ticks
get the minor tick instances; grow as necessary
XAxis.get_minorticklabels
Return a list of Text instances for the minor ticklabels
XAxis.get_minorticklines
Return the minor tick lines as a list of Line2D instances
XAxis.get_minorticklocs
Get the minor tick locations in data coordinates as a numpy array
XAxis.get_minpos
 
XAxis.get_offset_text
Return the axis offsetText as a Text instance
XAxis.get_pickradius
Return the depth of the axis used by the picker
XAxis.get_scale
 
Inherited from artist
Ticks

Tick.add_callback
Adds a callback function that will be called whenever one of the Artist’s properties changes.
Tick.aname
 
Tick.axes
The Axes instance the artist resides in, or None.
Tick.contains
Test whether the mouse event occurred in the Tick marks.
Tick.convert_xunits
For artists in an axes, if the xaxis has units support,
Tick.convert_yunits
For artists in an axes, if the yaxis has units support,
Tick.draw
 
Tick.findobj
Find artist objects.
Tick.format_cursor_data
Return cursor data string formatted.
Tick.get_agg_filter
return filter function to be used for agg filter
Tick.get_alpha
Return the alpha value used for blending - not supported on all
Tick.get_animated
Return the artist’s animated state
Tick.get_children
 
Tick.get_clip_box
Return artist clipbox
Tick.get_clip_on
Return whether artist uses clipping
Tick.get_clip_path
Return artist clip path
Tick.get_contains
Return the _contains test used by the artist, or None for default.
Tick.get_cursor_data
Get the cursor data for a given event.
Tick.get_figure
Return the Figure instance the artist belongs to.
Tick.get_gid
Returns the group id
Tick.get_label
Get the label used for this artist in the legend.
Tick.get_path_effects
 
Tick.get_picker
Return the picker object used by this artist
Tick.get_rasterized
return True if the artist is to be rasterized
Tick.get_sketch_params
Returns the sketch parameters for the artist.
Tick.get_snap
Returns the snap setting which may be:
Tick.get_transform
Return the Transform instance used by this artist.
Tick.get_transformed_clip_path_and_affine
Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation.
Tick.get_url
Returns the url
Tick.get_visible
Return the artist’s visiblity
Tick.get_window_extent
Get the axes bounding box in display space.
Tick.get_zorder
Return the Artist’s zorder.
Tick.have_units
Return True if units are set on the x or y axes
Axis

Axis.add_callback
Adds a callback function that will be called whenever one of the Artist’s properties changes.
Axis.aname
 
Axis.axes
The Axes instance the artist resides in, or None.
Axis.contains
Test whether the artist contains the mouse event.
Axis.convert_xunits
For artists in an axes, if the xaxis has units support,
Axis.convert_yunits
For artists in an axes, if the yaxis has units support,
Axis.draw
Draw the axis lines, grid lines, tick lines and labels
Axis.findobj
Find artist objects.
Axis.format_cursor_data
Return cursor data string formatted.
Axis.get_agg_filter
return filter function to be used for agg filter
Axis.get_alpha
Return the alpha value used for blending - not supported on all
Axis.get_animated
Return the artist’s animated state
Axis.get_children
 
Axis.get_clip_box
Return artist clipbox
Axis.get_clip_on
Return whether artist uses clipping
Axis.get_clip_path
Return artist clip path
Axis.get_contains
Return the _contains test used by the artist, or None for default.
Axis.get_cursor_data
Get the cursor data for a given event.
Axis.get_figure
Return the Figure instance the artist belongs to.
Axis.get_gid
Returns the group id
Axis.get_label
Return the axis label as a Text instance
Axis.get_path_effects
 
Axis.get_picker
Return the picker object used by this artist
Axis.get_rasterized
return True if the artist is to be rasterized
Axis.get_sketch_params
Returns the sketch parameters for the artist.
Axis.get_snap
Returns the snap setting which may be:
Axis.get_transform
 
Axis.get_transformed_clip_path_and_affine
Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation.
Axis.get_url
Returns the url
Axis.get_visible
Return the artist’s visiblity
Axis.get_window_extent
Get the axes bounding box in display space.
Axis.get_zorder
Return the Artist’s zorder.
Axis.have_units
 
Axis.hitlist
List the children of the artist which contain the mouse event event.
Axis.is_figure_set
Returns True if the artist is assigned to a Figure.
Axis.is_transform_set
Returns True if Artist has a transform explicitly set.
Axis.mouseover
 
Axis.pchanged
Fire an event when property changed, calling all of the registered callbacks.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息