Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 45cef15

Browse files
committed
Improve the documentation
1 parent ce91884 commit 45cef15

1 file changed

Lines changed: 33 additions & 10 deletions

File tree

examples/pylab_examples/leftventricle_bulleye.py

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,41 @@
11
#!/usr/bin/env python
22
"""
3-
In this example we create the bull eye representation for the left ventricle
4-
according to the American Heart Association (AHA)
3+
This example demonstrates how to create the 17 segment model for the left
4+
ventricle recommended by the American Heart Association (AHA).
55
"""
66

77
import numpy as np
88
import matplotlib as mpl
99
import matplotlib.pyplot as plt
1010

1111

12-
def bulleye_plot(data, ax, vlim=None, segBold=[]):
12+
def bullseye_plot(ax, data, vlim=None, segBold=[]):
1313
"""
14-
Left Ventricle bull eye for the Left Ventricle according to the
15-
American Heart Association (AHA)
14+
Bullseye representation for the left ventricle.
15+
16+
Parameters
17+
----------
18+
ax : axes
19+
data : list of int and float
20+
The intensity values for each of the 17 segments
21+
vlim : [min, max] or None
22+
Optional argument to set the Intensity range
23+
segBold: list of int
24+
A list with the segments to highlight
25+
26+
27+
Notes
28+
-----
29+
This function create the 17 segment model for the left ventricle according
30+
to the American Heart Association (AHA) [1]_
31+
32+
References
33+
----------
34+
.. [1] M. D. Cerqueira, N. J. Weissman, V. Dilsizian, A. K. Jacobs,
35+
S. Kaul, W. K. Laskey, D. J. Pennell, J. A. Rumberger, T. Ryan,
36+
and M. S. Verani, “Standardized myocardial segmentation and nomenclature
37+
for tomographic imaging of the heart,” Circulation, vol. 105, no. 4,
38+
pp. 539–542, 2002.
1639
"""
1740

1841
linewidth = 2
@@ -101,13 +124,13 @@ def bulleye_plot(data, ax, vlim=None, segBold=[]):
101124

102125
fig, ax = plt.subplots(figsize=(12, 8), nrows=1, ncols=2,
103126
subplot_kw=dict(projection='polar'))
104-
fig.canvas.set_window_title('Left Ventricle Bull Eyes (AHA)')
127+
fig.canvas.set_window_title('Left Ventricle Bulls Eyes (AHA)')
105128

106-
bulleye_plot(data, ax[0], vlim=vlim)
107-
ax[0].set_title('Bull Eye (AHA)')
129+
bullseye_plot(ax[0], data, vlim=vlim)
130+
ax[0].set_title('Bulls Eye (AHA)')
108131

109-
bulleye_plot(data, ax[1], segBold=[3,5,6,11,12,16],
110-
vlim=vlim)
132+
bullseye_plot(ax[1], data, segBold=[3, 5, 6, 11, 12, 16],
133+
vlim=vlim)
111134
ax[1].set_title('Segments [3,5,6,11,12,16] in bold')
112135

113136

0 commit comments

Comments
 (0)