99import matplotlib .pyplot as plt
1010
1111
12- def bullseye_plot (ax , data , segBold = [] , cmap = None , norm = None ):
12+ def bullseye_plot (ax , data , segBold = None , cmap = None , norm = None ):
1313 """
1414 Bullseye representation for the left ventricle.
1515
@@ -18,12 +18,12 @@ def bullseye_plot(ax, data, segBold=[], cmap=None, norm=None):
1818 ax : axes
1919 data : list of int and float
2020 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
2622 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
2727
2828
2929 Notes
@@ -35,10 +35,12 @@ def bullseye_plot(ax, data, segBold=[], cmap=None, norm=None):
3535 ----------
3636 .. [1] M. D. Cerqueira, N. J. Weissman, V. Dilsizian, A. K. Jacobs,
3737 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.
4141 """
42+ if segBold is None :
43+ segBold = []
4244
4345 linewidth = 2
4446 data = np .array (data ).ravel ()
@@ -108,7 +110,7 @@ def bullseye_plot(ax, data, segBold=[], cmap=None, norm=None):
108110 ax .plot (theta0 [0 ], [r [0 ], r [1 ]], '-k' , lw = linewidth + 1 )
109111 ax .plot (theta0 [- 1 ], [r [0 ], r [1 ]], '-k' , lw = linewidth + 1 )
110112
111- #Fill the segments 17
113+ # Fill the segments 17
112114 if data .size == 17 :
113115 r0 = np .array ([0 , r [0 ]])
114116 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):
198200bullseye_plot (ax [1 ], data , cmap = cmap2 , norm = norm2 )
199201ax [1 ].set_title ('Bulls Eye (AHA)' )
200202
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 )
202205ax [2 ].set_title ('Segments [3,5,6,11,12,16] in bold' )
203206
204207plt .show ()
0 commit comments