1212import matplotlib .pyplot as plt
1313
1414
15- def bullseye_plot (ax , data , segBold = None , cmap = None , norm = None ):
15+ def bullseye_plot (ax , data , seg_bold = None , cmap = None , norm = None ):
1616 """
1717 Bullseye representation for the left ventricle.
1818
@@ -21,7 +21,7 @@ def bullseye_plot(ax, data, segBold=None, cmap=None, norm=None):
2121 ax : axes
2222 data : list of int and float
2323 The intensity values for each of the 17 segments
24- segBold : list of int, optional
24+ seg_bold : list of int, optional
2525 A list with the segments to highlight
2626 cmap : ColorMap or None, optional
2727 Optional argument to set the desired colormap
@@ -42,8 +42,8 @@ def bullseye_plot(ax, data, segBold=None, cmap=None, norm=None):
4242 nomenclature for tomographic imaging of the heart",
4343 Circulation, vol. 105, no. 4, pp. 539-542, 2002.
4444 """
45- if segBold is None :
46- segBold = []
45+ if seg_bold is None :
46+ seg_bold = []
4747
4848 linewidth = 2
4949 data = np .array (data ).ravel ()
@@ -80,7 +80,7 @@ def bullseye_plot(ax, data, segBold=None, cmap=None, norm=None):
8080 theta0 = np .repeat (theta0 [:, np .newaxis ], 2 , axis = 1 )
8181 z = np .ones ((128 , 2 )) * data [i ]
8282 ax .pcolormesh (theta0 , r0 , z , cmap = cmap , norm = norm )
83- if i + 1 in segBold :
83+ if i + 1 in seg_bold :
8484 ax .plot (theta0 , r0 , '-k' , lw = linewidth + 2 )
8585 ax .plot (theta0 [0 ], [r [2 ], r [3 ]], '-k' , lw = linewidth + 1 )
8686 ax .plot (theta0 [- 1 ], [r [2 ], r [3 ]], '-k' , lw = linewidth + 1 )
@@ -94,7 +94,7 @@ def bullseye_plot(ax, data, segBold=None, cmap=None, norm=None):
9494 theta0 = np .repeat (theta0 [:, np .newaxis ], 2 , axis = 1 )
9595 z = np .ones ((128 , 2 )) * data [i + 6 ]
9696 ax .pcolormesh (theta0 , r0 , z , cmap = cmap , norm = norm )
97- if i + 7 in segBold :
97+ if i + 7 in seg_bold :
9898 ax .plot (theta0 , r0 , '-k' , lw = linewidth + 2 )
9999 ax .plot (theta0 [0 ], [r [1 ], r [2 ]], '-k' , lw = linewidth + 1 )
100100 ax .plot (theta0 [- 1 ], [r [1 ], r [2 ]], '-k' , lw = linewidth + 1 )
@@ -108,7 +108,7 @@ def bullseye_plot(ax, data, segBold=None, cmap=None, norm=None):
108108 theta0 = np .repeat (theta0 [:, np .newaxis ], 2 , axis = 1 )
109109 z = np .ones ((192 , 2 )) * data [i + 12 ]
110110 ax .pcolormesh (theta0 , r0 , z , cmap = cmap , norm = norm )
111- if i + 13 in segBold :
111+ if i + 13 in seg_bold :
112112 ax .plot (theta0 , r0 , '-k' , lw = linewidth + 2 )
113113 ax .plot (theta0 [0 ], [r [0 ], r [1 ]], '-k' , lw = linewidth + 1 )
114114 ax .plot (theta0 [- 1 ], [r [0 ], r [1 ]], '-k' , lw = linewidth + 1 )
@@ -120,7 +120,7 @@ def bullseye_plot(ax, data, segBold=None, cmap=None, norm=None):
120120 theta0 = np .repeat (theta [:, np .newaxis ], 2 , axis = 1 )
121121 z = np .ones ((theta .size , 2 )) * data [16 ]
122122 ax .pcolormesh (theta0 , r0 , z , cmap = cmap , norm = norm )
123- if 17 in segBold :
123+ if 17 in seg_bold :
124124 ax .plot (theta0 , r0 , '-k' , lw = linewidth + 2 )
125125
126126 ax .set_ylim ([0 , 1 ])
@@ -203,7 +203,7 @@ def bullseye_plot(ax, data, segBold=None, cmap=None, norm=None):
203203bullseye_plot (ax [1 ], data , cmap = cmap2 , norm = norm2 )
204204ax [1 ].set_title ('Bulls Eye (AHA)' )
205205
206- bullseye_plot (ax [2 ], data , segBold = [3 , 5 , 6 , 11 , 12 , 16 ],
206+ bullseye_plot (ax [2 ], data , seg_bold = [3 , 5 , 6 , 11 , 12 , 16 ],
207207 cmap = cmap3 , norm = norm3 )
208208ax [2 ].set_title ('Segments [3,5,6,11,12,16] in bold' )
209209
0 commit comments