Movatterモバイル変換


[0]ホーム

URL:


You are reading an old version of the documentation (v2.0.0). For the latest version seehttps://matplotlib.org/stable/api/spines_api.html
matplotlib

Navigation


Travis-CI:

Table Of Contents

Related Topics

This Page

Quick search

spines

matplotlib.spines

classmatplotlib.spines.Spine(axes,spine_type,path,**kwargs)

Bases:matplotlib.patches.Patch

an axis spine – the line noting the data area boundaries

Spines are the lines connecting the axis tick marks and noting theboundaries of the data area. They can be placed at arbitrarypositions. See function:set_positionfor more information.

The default position is('outward',0).

Spines are subclasses of class:Patch, andinherit much of their behavior.

Spines draw a line or a circle, depending iffunction:set_patch_line orfunction:set_patch_circle has beencalled. Line-like is the default.

  • axes : the Axes instance containing the spine
  • spine_type : a string specifying the spine type
  • path : the path instance used to draw the spine

Valid kwargs are:

PropertyDescription
agg_filterunknown
alphafloat or None
animated[True | False]
antialiased or aa[True | False] or None for default
axesanAxes instance
capstyle[‘butt’ | ‘round’ | ‘projecting’]
clip_boxamatplotlib.transforms.Bbox instance
clip_on[True | False]
clip_path[ (Path,Transform) |Patch | None ]
colormatplotlib color spec
containsa callable function
edgecolor or ecmpl color spec, None, ‘none’, or ‘auto’
facecolor or fcmpl color spec, or None for default, or ‘none’ for no color
figureamatplotlib.figure.Figure instance
fill[True | False]
gidan id string
hatch[‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’]
joinstyle[‘miter’ | ‘round’ | ‘bevel’]
labelstring or anything printable with ‘%s’ conversion.
linestyle or ls[‘solid’ | ‘dashed’, ‘dashdot’, ‘dotted’ | (offset, on-off-dash-seq) |'-' |'--' |'-.' |':' |'None' |'' |'']
linewidth or lwfloat or None for default
path_effectsunknown
picker[None|float|boolean|callable]
rasterized[True | False | None]
sketch_paramsunknown
snapunknown
transformTransform instance
urla url string
visible[True | False]
zorderany number
classmethodcircular_spine(axes,center,radius,**kwargs)

(staticmethod) Returns a circularSpine.

cla()

Clear the current spine

draw(artist,renderer,*args,**kwargs)
get_bounds()

Get the bounds of the spine.

get_patch_transform()
get_path()
get_position()

get the spine position

get_smart_bounds()

get whether the spine has smart bounds

get_spine_transform()

get the spine transform

is_frame_like()

return True if directly on axes frame

This is useful for determining if a spine is the edge of anold style MPL plot. If so, this function will return True.

classmethodlinear_spine(axes,spine_type,**kwargs)

(staticmethod) Returns a linearSpine.

register_axis(axis)

register an axis

An axis should be registered with its corresponding spine fromthe Axes instance. This allows the spine to clear any axisproperties when needed.

set_bounds(low,high)

Set the bounds of the spine.

set_color(c)

Set the edgecolor.

ACCEPTS: matplotlib color arg or sequence of rgba tuples

See also

set_facecolor(),set_edgecolor()
For setting the edge or face color individually.
set_patch_circle(center,radius)

set the spine to be circular

set_patch_line()

set the spine to be linear

set_position(position)

set the position of the spine

Spine position is specified by a 2 tuple of (position type,amount). The position types are:

  • ‘outward’ : place the spine out from the data area by thespecified number of points. (Negative values specify placing thespine inward.)
  • ‘axes’ : place the spine at the specified Axes coordinate (from0.0-1.0).
  • ‘data’ : place the spine at the specified data coordinate.

Additionally, shorthand notations define a special positions:

  • ‘center’ -> (‘axes’,0.5)
  • ‘zero’ -> (‘data’, 0.0)
set_smart_bounds(value)

set the spine and associated axis to have smart bounds

© Copyright 2002 - 2012 John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the Matplotlib development team; 2012 - 2016 The Matplotlib development team. Last updated on Feb 20, 2017. Created usingSphinx 1.5.2.

[8]ページ先頭

©2009-2026 Movatter.jp