How to draw the start and end points of lines that represent a closed curve (i.e. that end in a :None:None:`~.path.Path.CLOSEPOLY`) is controlled by the line's JoinStyle
. For all other lines, how the start and end points are drawn is controlled by the CapStyle.
For a visual impression of each CapStyle, :None:None:`view these docs online
<CapStyle>` or run :None:None:`CapStyle.demo`.
Supported values:
.. rst-class:: value-list
'butt'
the line is squared off at its endpoint.
'projecting'
the line is squared off as in *butt*, but the filled in area
extends beyond the endpoint a distance of ``linewidth/2``.
'round'
like *butt*, but a semicircular cap is added to the end of the
line, of radius ``linewidth/2``.
.. plot::
('alt', "Demo of possible CapStyle's")
from matplotlib._enums import CapStyle
CapStyle.demo()
Define how the two endpoints (caps) of an unclosed line are drawn.
The following pages refer to to this document either explicitly or contain code examples using this.
matplotlib.axes._axes.Axes.broken_barhmatplotlib.artist.Patch.setmatplotlib.patches.RegularPolygon.__init__matplotlib.axes._axes.Axes.coherematplotlib.artist.AsteriskPolygonCollection.setmatplotlib.artist.QuadMesh.setmatplotlib.pyplot.errorbarmatplotlib.pyplot.angle_spectrummatplotlib.artist.CirclePolygon.setmatplotlib.axes._axes.Axes.quivermatplotlib.pyplot.pcolormatplotlib.axes._axes.Axes.magnitude_spectrummatplotlib.patches.Wedge.__init__matplotlib.artist.BrokenBarHCollection.setmatplotlib.pyplot.fill_betweenmatplotlib.patches.Polygon.__init__matplotlib.collections.Collection.set_capstylematplotlib.artist.StepPatch.setmatplotlib.pyplot.axvlinematplotlib.pyplot.axvspanmatplotlib.axes._axes.Axes.axhlinematplotlib.patches.PathPatch.__init__matplotlib.artist.PathCollection.setmatplotlib.axes._axes.Axes.barbsmatplotlib.artist.PatchCollection.setmatplotlib.patches.FancyArrowPatch.__init__matplotlib.artist.Ellipse.setmatplotlib.patches.FancyArrow.__init__matplotlib.lines.Line2D.get_dash_capstylematplotlib.axes._axes.Axes.phase_spectrummatplotlib.axes._axes.Axes.axhspanmatplotlib.artist.Shadow.setmatplotlib.pyplot.barbsmatplotlib.patches.Patch.__init__matplotlib.artist.Rectangle.setmatplotlib.patches.Circle.__init__matplotlib.patches.Arrow.__init__matplotlib.artist.RegularPolygon.setmatplotlib.artist.FancyArrowPatch.setmatplotlib.axes._axes.Axes.fill_betweenmatplotlib.artist.PolyCollection.setmatplotlib.artist.LineCollection.setmatplotlib.lines.Line2D.__init__matplotlib.lines.Line2D.get_solid_capstylematplotlib.pyplot.psdmatplotlib.pyplot.plotmatplotlib.artist.Line2D.setmatplotlib.patches.FancyBboxPatch.__init__matplotlib.axes._axes.Axes.arrowmatplotlib.pyplot.barmatplotlib.pyplot.axhspanmatplotlib.pyplot.csdmatplotlib.artist.CircleCollection.setmatplotlib.axes._axes.Axes.hexbinmatplotlib.axes._axes.Axes.spymatplotlib.axes._axes.Axes.fill_betweenxmatplotlib.axes._axes.Axes.pcolormatplotlib.patches.CirclePolygon.__init__matplotlib.quiver.Barbs.__init__matplotlib.artist.Wedge.setmatplotlib.pyplot.pcolormeshmatplotlib.artist.Collection.setmatplotlib.artist.TriMesh.setmatplotlib.pyplot.hexbinmatplotlib.artist.Spine.setmatplotlib.axes._axes.Axes.barmatplotlib.patches.Ellipse.__init__matplotlib.patches.StepPatch.__init__matplotlib.backend_bases.GraphicsContextBase.get_capstylematplotlib.patches.Rectangle.__init__matplotlib.axes._axes.Axes.indicate_insetmatplotlib.patches.Shadow.__init__matplotlib.spines.Spine.__init__matplotlib.pyplot.plot_datematplotlib.artist.Arrow.setmatplotlib.pyplot.spymatplotlib.artist.Annulus.setmatplotlib.artist.Polygon.setmatplotlib.pyplot.axlinematplotlib.axes._axes.Axes.pcolormeshmatplotlib.pyplot.gridmatplotlib.patches.Arc.__init__matplotlib.pyplot.barhmatplotlib.artist._CollectionWithSizes.setmatplotlib.sankey.Sankey.addmatplotlib.artist.PathPatch.setmatplotlib.axes._axes.Axes.plotmatplotlib.patches.Annulus.__init__matplotlib.artist.EventCollection.setmatplotlib.pyplot.fill_betweenxmatplotlib.artist.StarPolygonCollection.setmatplotlib.artist.Cell.setmatplotlib.quiver.Quiver.__init__matplotlib.artist.FancyBboxPatch.setmatplotlib.artist.EllipseCollection.setmatplotlib.patches.Patch.set_capstylematplotlib.artist.ConnectionPatch.setmatplotlib.artist._ColorbarSpine.setmatplotlib.artist.Arc.setmatplotlib.axes._axes.Axes.axlinematplotlib.artist.RegularPolyCollection.setmatplotlib.artist.Barbs.setmatplotlib.axes._axes.Axes.axvspanmatplotlib.artist.Circle.setmatplotlib.pyplot.coherematplotlib.pyplot.magnitude_spectrummatplotlib.axes._base._AxesBase.gridmatplotlib.axes._axes.Axes.psdmatplotlib.pyplot.phase_spectrummatplotlib.axes._axes.Axes.csdmatplotlib.axes._axes.Axes.plot_datematplotlib.pyplot.quivermatplotlib.artist._AxLine.setmatplotlib.pyplot.broken_barhmatplotlib.axes._axes.Axes.barhmatplotlib.axes._axes.Axes.angle_spectrummatplotlib.axes._axes.Axes.axvlinematplotlib.artist.FancyArrow.setmatplotlib.pyplot.arrowmatplotlib.pyplot.axhlinematplotlib.axes._axes.Axes.errorbarmatplotlib.artist.Quiver.setHover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them