@@ -136,25 +136,25 @@ def example_data():
136
136
'column names' :
137
137
['Sulfate' , 'Nitrate' , 'EC' , 'OC1' , 'OC2' , 'OC3' , 'OP' , 'CO' ,
138
138
'O3' ],
139
- 'Basecase' :
139
+ ( 0 , 'Basecase' ) :
140
140
[[0.88 , 0.01 , 0.03 , 0.03 , 0.00 , 0.06 , 0.01 , 0.00 , 0.00 ],
141
141
[0.07 , 0.95 , 0.04 , 0.05 , 0.00 , 0.02 , 0.01 , 0.00 , 0.00 ],
142
142
[0.01 , 0.02 , 0.85 , 0.19 , 0.05 , 0.10 , 0.00 , 0.00 , 0.00 ],
143
143
[0.02 , 0.01 , 0.07 , 0.01 , 0.21 , 0.12 , 0.98 , 0.00 , 0.00 ],
144
144
[0.01 , 0.01 , 0.02 , 0.71 , 0.74 , 0.70 , 0.00 , 0.00 , 0.00 ]],
145
- 'With CO' :
145
+ ( 1 , 'With CO' ) :
146
146
[[0.88 , 0.02 , 0.02 , 0.02 , 0.00 , 0.05 , 0.00 , 0.05 , 0.00 ],
147
147
[0.08 , 0.94 , 0.04 , 0.02 , 0.00 , 0.01 , 0.12 , 0.04 , 0.00 ],
148
148
[0.01 , 0.01 , 0.79 , 0.10 , 0.00 , 0.05 , 0.00 , 0.31 , 0.00 ],
149
149
[0.00 , 0.02 , 0.03 , 0.38 , 0.31 , 0.31 , 0.00 , 0.59 , 0.00 ],
150
150
[0.02 , 0.02 , 0.11 , 0.47 , 0.69 , 0.58 , 0.88 , 0.00 , 0.00 ]],
151
- 'With O3' :
151
+ ( 2 , 'With O3' ) :
152
152
[[0.89 , 0.01 , 0.07 , 0.00 , 0.00 , 0.05 , 0.00 , 0.00 , 0.03 ],
153
153
[0.07 , 0.95 , 0.05 , 0.04 , 0.00 , 0.02 , 0.12 , 0.00 , 0.00 ],
154
154
[0.01 , 0.02 , 0.86 , 0.27 , 0.16 , 0.19 , 0.00 , 0.00 , 0.00 ],
155
155
[0.01 , 0.03 , 0.00 , 0.32 , 0.29 , 0.27 , 0.00 , 0.00 , 0.95 ],
156
156
[0.02 , 0.00 , 0.03 , 0.37 , 0.56 , 0.47 , 0.87 , 0.00 , 0.00 ]],
157
- 'CO & O3' :
157
+ ( 3 , 'CO & O3' ) :
158
158
[[0.87 , 0.01 , 0.08 , 0.00 , 0.00 , 0.04 , 0.00 , 0.00 , 0.01 ],
159
159
[0.09 , 0.95 , 0.02 , 0.03 , 0.00 , 0.01 , 0.13 , 0.06 , 0.00 ],
160
160
[0.01 , 0.02 , 0.71 , 0.24 , 0.13 , 0.16 , 0.00 , 0.50 , 0.00 ],
@@ -175,12 +175,12 @@ def example_data():
175
175
176
176
colors = ['b' , 'r' , 'g' , 'm' , 'y' ]
177
177
# Plot the four cases from the example data on separate axes
178
- for n , title in enumerate (data .keys ()):
178
+ for ( n , title ), case_data in sorted (data .items ()):
179
179
ax = fig .add_subplot (2 , 2 , n + 1 , projection = 'radar' )
180
180
plt .rgrids ([0.2 , 0.4 , 0.6 , 0.8 ])
181
181
ax .set_title (title , weight = 'bold' , size = 'medium' , position = (0.5 , 1.1 ),
182
182
horizontalalignment = 'center' , verticalalignment = 'center' )
183
- for d , color in zip (data [ title ] , colors ):
183
+ for d , color in zip (case_data , colors ):
184
184
ax .plot (theta , d , color = color )
185
185
ax .fill (theta , d , facecolor = color , alpha = 0.25 )
186
186
ax .set_varlabels (spoke_labels )
0 commit comments