Define how the connection between two line segments is drawn. For a visual impression of each *JoinStyle*, `view these docs online `, or run `JoinStyle.demo`. Lines in Matplotlib are typically defined by a 1D `~.path.Path` and a finite ``linewidth``, where the under
| 15 | |
| 16 | |
| 17 | class JoinStyle(str, Enum): |
| 18 | """ |
| 19 | Define how the connection between two line segments is drawn. |
| 20 | |
| 21 | For a visual impression of each *JoinStyle*, `view these docs online |
| 22 | <JoinStyle>`, or run `JoinStyle.demo`. |
| 23 | |
| 24 | Lines in Matplotlib are typically defined by a 1D `~.path.Path` and a |
| 25 | finite ``linewidth``, where the underlying 1D `~.path.Path` represents the |
| 26 | center of the stroked line. |
| 27 | |
| 28 | By default, `~.backend_bases.GraphicsContextBase` defines the boundaries of |
| 29 | a stroked line to simply be every point within some radius, |
| 30 | ``linewidth/2``, away from any point of the center line. However, this |
| 31 | results in corners appearing "rounded", which may not be the desired |
| 32 | behavior if you are drawing, for example, a polygon or pointed star. |
| 33 | |
| 34 | **Supported values:** |
| 35 | |
| 36 | .. rst-class:: value-list |
| 37 | |
| 38 | 'miter' |
| 39 | the "arrow-tip" style. Each boundary of the filled-in area will |
| 40 | extend in a straight line parallel to the tangent vector of the |
| 41 | centerline at the point it meets the corner, until they meet in a |
| 42 | sharp point. |
| 43 | 'round' |
| 44 | stokes every point within a radius of ``linewidth/2`` of the center |
| 45 | lines. |
| 46 | 'bevel' |
| 47 | the "squared-off" style. It can be thought of as a rounded corner |
| 48 | where the "circular" part of the corner has been cut off. |
| 49 | |
| 50 | .. note:: |
| 51 | |
| 52 | Very long miter tips are cut off (to form a *bevel*) after a |
| 53 | backend-dependent limit called the "miter limit", which specifies the |
| 54 | maximum allowed ratio of miter length to line width. For example, the |
| 55 | PDF backend uses the default value of 10 specified by the PDF standard, |
| 56 | while the SVG backend does not even specify the miter limit, resulting |
| 57 | in a default value of 4 per the SVG specification. Matplotlib does not |
| 58 | currently allow the user to adjust this parameter. |
| 59 | |
| 60 | A more detailed description of the effect of a miter limit can be found |
| 61 | in the `Mozilla Developer Docs |
| 62 | <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-miterlimit>`_ |
| 63 | |
| 64 | .. plot:: |
| 65 | :alt: Demo of possible JoinStyle's |
| 66 | |
| 67 | from matplotlib._enums import JoinStyle |
| 68 | JoinStyle.demo() |
| 69 | |
| 70 | """ |
| 71 | |
| 72 | miter = "miter" |
| 73 | round = "round" |
| 74 | bevel = "bevel" |
no outgoing calls
no test coverage detected
searching dependent graphs…