File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
examples/lines_bars_and_markers Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 1
1
"""
2
2
Reference for filled- and unfilled-marker types included with Matplotlib.
3
3
"""
4
+ from six import iteritems
4
5
import numpy as np
5
6
import matplotlib .pyplot as plt
6
7
from matplotlib .lines import Line2D
@@ -32,7 +33,9 @@ def split_list(a_list):
32
33
fig , axes = plt .subplots (ncols = 2 )
33
34
34
35
# Filter out filled markers and marker settings that do nothing.
35
- unfilled_markers = [m for m , func in Line2D .markers .items ()
36
+ # We use iteritems from six to make sure that we get an iterator
37
+ # in both python 2 and 3
38
+ unfilled_markers = [m for m , func in iteritems (Line2D .markers )
36
39
if func != 'nothing' and m not in Line2D .filled_markers ]
37
40
# Reverse-sort for pretty
38
41
unfilled_markers = sorted (unfilled_markers , key = str )[::- 1 ]
You can’t perform that action at this time.
0 commit comments