Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ebb3f67

Browse filesBrowse files
committed
Fix radar_chart.py on Python 3
1 parent a720fd7 commit ebb3f67
Copy full SHA for ebb3f67

File tree

Expand file treeCollapse file tree

1 file changed

+7
-8
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-8
lines changed

‎examples/api/radar_chart.py

Copy file name to clipboardExpand all lines: examples/api/radar_chart.py
+7-8Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def draw_circle_patch(self):
4646

4747
patch_dict = {'polygon': draw_poly_patch, 'circle': draw_circle_patch}
4848
if frame not in patch_dict:
49-
raise ValueError, 'unknown value for `frame`: %s' % frame
49+
raise ValueError('unknown value for `frame`: %s' % frame)
5050

5151
class RadarAxes(PolarAxes):
5252

@@ -133,7 +133,8 @@ def example_data():
133133
# 4)Inclusion of both gas-phase speciesis present...
134134
data = {
135135
'column names':
136-
['Sulfate', 'Nitrate', 'EC', 'OC1', 'OC2', 'OC3', 'OP', 'CO', 'O3'],
136+
['Sulfate', 'Nitrate', 'EC', 'OC1', 'OC2', 'OC3', 'OP', 'CO',
137+
'O3'],
137138
'Basecase':
138139
[[0.88, 0.01, 0.03, 0.03, 0.00, 0.06, 0.01, 0.00, 0.00],
139140
[0.07, 0.95, 0.04, 0.05, 0.00, 0.02, 0.01, 0.00, 0.00],
@@ -157,8 +158,7 @@ def example_data():
157158
[0.09, 0.95, 0.02, 0.03, 0.00, 0.01, 0.13, 0.06, 0.00],
158159
[0.01, 0.02, 0.71, 0.24, 0.13, 0.16, 0.00, 0.50, 0.00],
159160
[0.01, 0.03, 0.00, 0.28, 0.24, 0.23, 0.00, 0.44, 0.88],
160-
[0.02, 0.00, 0.18, 0.45, 0.64, 0.55, 0.86, 0.00, 0.16]]
161-
}
161+
[0.02, 0.00, 0.18, 0.45, 0.64, 0.55, 0.86, 0.00, 0.16]]}
162162
return data
163163

164164

@@ -185,12 +185,11 @@ def example_data():
185185
ax.set_varlabels(spoke_labels)
186186

187187
# add legend relative to top-left plot
188-
plt.subplot(2,2,1)
188+
plt.subplot(2, 2, 1)
189189
labels = ('Factor 1', 'Factor 2', 'Factor 3', 'Factor 4', 'Factor 5')
190190
legend = plt.legend(labels, loc=(0.9, .95), labelspacing=0.1)
191191
plt.setp(legend.get_texts(), fontsize='small')
192192

193-
plt.figtext(0.5, 0.965, '5-Factor Solution Profiles Across Four Scenarios',
194-
ha='center', color='black', weight='bold', size='large')
193+
plt.figtext(0.5, 0.965, '5-Factor Solution Profiles Across Four Scenarios',
194+
ha='center', color='black', weight='bold', size='large')
195195
plt.show()
196-

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.