9
9
import matplotlib .pyplot as plt
10
10
11
11
12
- def bullseye_plot (ax , data , segBold = [] , cmap = None , norm = None ):
12
+ def bullseye_plot (ax , data , segBold = None , cmap = None , norm = None ):
13
13
"""
14
14
Bullseye representation for the left ventricle.
15
15
@@ -18,12 +18,12 @@ def bullseye_plot(ax, data, segBold=[], cmap=None, norm=None):
18
18
ax : axes
19
19
data : list of int and float
20
20
The intensity values for each of the 17 segments
21
- cmap : ColorMap or None
22
- Optional argument to set the disaried colormap
23
- norm : Normalize or None
24
- Optional argument to normalize data into the [0.0, 1.0] range
25
- segBold: list of int
21
+ segBold: list of int, optional
26
22
A list with the segments to highlight
23
+ cmap : ColorMap or None, optional
24
+ Optional argument to set the desired colormap
25
+ norm : Normalize or None, optional
26
+ Optional argument to normalize data into the [0.0, 1.0] range
27
27
28
28
29
29
Notes
@@ -35,10 +35,12 @@ def bullseye_plot(ax, data, segBold=[], cmap=None, norm=None):
35
35
----------
36
36
.. [1] M. D. Cerqueira, N. J. Weissman, V. Dilsizian, A. K. Jacobs,
37
37
S. Kaul, W. K. Laskey, D. J. Pennell, J. A. Rumberger, T. Ryan,
38
- and M. S. Verani, "Standardized myocardial segmentation and nomenclature
39
- for tomographic imaging of the heart", Circulation, vol. 105, no. 4 ,
40
- pp. 539-542, 2002.
38
+ and M. S. Verani, "Standardized myocardial segmentation and
39
+ nomenclature for tomographic imaging of the heart",
40
+ Circulation, vol. 105, no. 4, pp. 539-542, 2002.
41
41
"""
42
+ if segBold is None :
43
+ segBold = []
42
44
43
45
linewidth = 2
44
46
data = np .array (data ).ravel ()
@@ -108,7 +110,7 @@ def bullseye_plot(ax, data, segBold=[], cmap=None, norm=None):
108
110
ax .plot (theta0 [0 ], [r [0 ], r [1 ]], '-k' , lw = linewidth + 1 )
109
111
ax .plot (theta0 [- 1 ], [r [0 ], r [1 ]], '-k' , lw = linewidth + 1 )
110
112
111
- #Fill the segments 17
113
+ # Fill the segments 17
112
114
if data .size == 17 :
113
115
r0 = np .array ([0 , r [0 ]])
114
116
r0 = np .repeat (r0 [:, np .newaxis ], theta .size , axis = 1 ).T
@@ -198,7 +200,8 @@ def bullseye_plot(ax, data, segBold=[], cmap=None, norm=None):
198
200
bullseye_plot (ax [1 ], data , cmap = cmap2 , norm = norm2 )
199
201
ax [1 ].set_title ('Bulls Eye (AHA)' )
200
202
201
- bullseye_plot (ax [2 ], data , segBold = [3 , 5 , 6 , 11 , 12 , 16 ], cmap = cmap3 , norm = norm3 )
203
+ bullseye_plot (ax [2 ], data , segBold = [3 , 5 , 6 , 11 , 12 , 16 ],
204
+ cmap = cmap3 , norm = norm3 )
202
205
ax [2 ].set_title ('Segments [3,5,6,11,12,16] in bold' )
203
206
204
207
plt .show ()
0 commit comments