MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / draw_spine

Function draw_spine

galleries/examples/specialty_plots/ishikawa_diagram.py:151–179  ·  view source on GitHub ↗

Draw main spine, head and tail. Parameters ---------- xmin : int The default position of the head of the spine's x-coordinate. xmax : int The default position of the tail of the spine's x-coordinate. Returns ------- None.

(xmin: int, xmax: int)

Source from the content-addressed store, hash-verified

149
150
151def draw_spine(xmin: int, xmax: int):
152 """
153 Draw main spine, head and tail.
154
155 Parameters
156 ----------
157 xmin : int
158 The default position of the head of the spine's
159 x-coordinate.
160 xmax : int
161 The default position of the tail of the spine's
162 x-coordinate.
163
164 Returns
165 -------
166 None.
167
168 """
169 # draw main spine
170 ax.plot([xmin - 0.1, xmax], [0, 0], color='tab:blue', linewidth=2)
171 # draw fish head
172 ax.text(xmax + 0.1, - 0.05, 'PROBLEM', fontsize=10,
173 weight='bold', color='white')
174 semicircle = Wedge((xmax, 0), 1, 270, 90, fc='tab:blue')
175 ax.add_patch(semicircle)
176 # draw fish tail
177 tail_pos = [[xmin - 0.8, 0.8], [xmin - 0.8, -0.8], [xmin, -0.01]]
178 triangle = Polygon(tail_pos, fc='tab:blue')
179 ax.add_patch(triangle)
180
181
182# Input data

Callers 1

draw_bodyFunction · 0.85

Calls 5

WedgeClass · 0.90
PolygonClass · 0.90
add_patchMethod · 0.80
plotMethod · 0.45
textMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…