12
12
import matplotlib .pyplot as plt
13
13
14
14
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 ):
16
16
"""
17
17
Bullseye representation for the left ventricle.
18
18
@@ -21,7 +21,7 @@ def bullseye_plot(ax, data, segBold=None, cmap=None, norm=None):
21
21
ax : axes
22
22
data : list of int and float
23
23
The intensity values for each of the 17 segments
24
- segBold : list of int, optional
24
+ seg_bold : list of int, optional
25
25
A list with the segments to highlight
26
26
cmap : ColorMap or None, optional
27
27
Optional argument to set the desired colormap
@@ -42,8 +42,8 @@ def bullseye_plot(ax, data, segBold=None, cmap=None, norm=None):
42
42
nomenclature for tomographic imaging of the heart",
43
43
Circulation, vol. 105, no. 4, pp. 539-542, 2002.
44
44
"""
45
- if segBold is None :
46
- segBold = []
45
+ if seg_bold is None :
46
+ seg_bold = []
47
47
48
48
linewidth = 2
49
49
data = np .array (data ).ravel ()
@@ -80,7 +80,7 @@ def bullseye_plot(ax, data, segBold=None, cmap=None, norm=None):
80
80
theta0 = np .repeat (theta0 [:, np .newaxis ], 2 , axis = 1 )
81
81
z = np .ones ((128 , 2 )) * data [i ]
82
82
ax .pcolormesh (theta0 , r0 , z , cmap = cmap , norm = norm )
83
- if i + 1 in segBold :
83
+ if i + 1 in seg_bold :
84
84
ax .plot (theta0 , r0 , '-k' , lw = linewidth + 2 )
85
85
ax .plot (theta0 [0 ], [r [2 ], r [3 ]], '-k' , lw = linewidth + 1 )
86
86
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):
94
94
theta0 = np .repeat (theta0 [:, np .newaxis ], 2 , axis = 1 )
95
95
z = np .ones ((128 , 2 )) * data [i + 6 ]
96
96
ax .pcolormesh (theta0 , r0 , z , cmap = cmap , norm = norm )
97
- if i + 7 in segBold :
97
+ if i + 7 in seg_bold :
98
98
ax .plot (theta0 , r0 , '-k' , lw = linewidth + 2 )
99
99
ax .plot (theta0 [0 ], [r [1 ], r [2 ]], '-k' , lw = linewidth + 1 )
100
100
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):
108
108
theta0 = np .repeat (theta0 [:, np .newaxis ], 2 , axis = 1 )
109
109
z = np .ones ((192 , 2 )) * data [i + 12 ]
110
110
ax .pcolormesh (theta0 , r0 , z , cmap = cmap , norm = norm )
111
- if i + 13 in segBold :
111
+ if i + 13 in seg_bold :
112
112
ax .plot (theta0 , r0 , '-k' , lw = linewidth + 2 )
113
113
ax .plot (theta0 [0 ], [r [0 ], r [1 ]], '-k' , lw = linewidth + 1 )
114
114
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):
120
120
theta0 = np .repeat (theta [:, np .newaxis ], 2 , axis = 1 )
121
121
z = np .ones ((theta .size , 2 )) * data [16 ]
122
122
ax .pcolormesh (theta0 , r0 , z , cmap = cmap , norm = norm )
123
- if 17 in segBold :
123
+ if 17 in seg_bold :
124
124
ax .plot (theta0 , r0 , '-k' , lw = linewidth + 2 )
125
125
126
126
ax .set_ylim ([0 , 1 ])
@@ -203,7 +203,7 @@ def bullseye_plot(ax, data, segBold=None, cmap=None, norm=None):
203
203
bullseye_plot (ax [1 ], data , cmap = cmap2 , norm = norm2 )
204
204
ax [1 ].set_title ('Bulls Eye (AHA)' )
205
205
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 ],
207
207
cmap = cmap3 , norm = norm3 )
208
208
ax [2 ].set_title ('Segments [3,5,6,11,12,16] in bold' )
209
209
0 commit comments