Set the drawstyle of the plot. The drawstyle determines how the points are connected. Parameters ---------- drawstyle : {'default', 'steps', 'steps-pre', 'steps-mid', \ 'steps-post'}, default: 'default' For 'default', the points are connected wi
(self, drawstyle)
| 1085 | self.stale = True |
| 1086 | |
| 1087 | def set_drawstyle(self, drawstyle): |
| 1088 | """ |
| 1089 | Set the drawstyle of the plot. |
| 1090 | |
| 1091 | The drawstyle determines how the points are connected. |
| 1092 | |
| 1093 | Parameters |
| 1094 | ---------- |
| 1095 | drawstyle : {'default', 'steps', 'steps-pre', 'steps-mid', \ |
| 1096 | 'steps-post'}, default: 'default' |
| 1097 | For 'default', the points are connected with straight lines. |
| 1098 | |
| 1099 | The steps variants connect the points with step-like lines, |
| 1100 | i.e. horizontal lines with vertical steps. They differ in the |
| 1101 | location of the step: |
| 1102 | |
| 1103 | - 'steps-pre': The step is at the beginning of the line segment, |
| 1104 | i.e. the line will be at the y-value of point to the right. |
| 1105 | - 'steps-mid': The step is halfway between the points. |
| 1106 | - 'steps-post: The step is at the end of the line segment, |
| 1107 | i.e. the line will be at the y-value of the point to the left. |
| 1108 | - 'steps' is equal to 'steps-pre' and is maintained for |
| 1109 | backward-compatibility. |
| 1110 | |
| 1111 | For examples see :doc:`/gallery/lines_bars_and_markers/step_demo`. |
| 1112 | """ |
| 1113 | if drawstyle is None: |
| 1114 | drawstyle = 'default' |
| 1115 | _api.check_in_list(self.drawStyles, drawstyle=drawstyle) |
| 1116 | if self._drawstyle != drawstyle: |
| 1117 | self.stale = True |
| 1118 | # invalidate to trigger a recache of the path |
| 1119 | self._invalidx = True |
| 1120 | self._drawstyle = drawstyle |
| 1121 | |
| 1122 | def set_gapcolor(self, gapcolor): |
| 1123 | """ |
no outgoing calls