@@ -29,10 +29,13 @@ def get_icon(name):
29
29
'--' : 'Dashed' ,
30
30
'-.' : 'DashDot' ,
31
31
':' : 'Dotted' ,
32
- 'steps' : 'Steps' ,
33
32
'none' : 'None' ,
34
33
}
35
34
35
+ DRAWSTYLES = {'default' : 'Default' ,
36
+ 'steps' : 'Steps' ,
37
+ }
38
+
36
39
MARKERS = markers .MarkerStyle .markers
37
40
38
41
@@ -70,6 +73,7 @@ def figure_edit(axes, parent=None):
70
73
linedict [label ] = line
71
74
curves = []
72
75
linestyles = list (six .iteritems (LINESTYLES ))
76
+ drawstyles = list (six .iteritems (DRAWSTYLES ))
73
77
markers = list (six .iteritems (MARKERS ))
74
78
curvelabels = sorted (linedict .keys ())
75
79
for label in curvelabels :
@@ -80,7 +84,8 @@ def figure_edit(axes, parent=None):
80
84
curvedata = [('Label' , label ),
81
85
sep ,
82
86
(None , '<b>Line</b>' ),
83
- ('Style' , [line .get_linestyle ()] + linestyles ),
87
+ ('Line Style' , [line .get_linestyle ()] + linestyles ),
88
+ ('Draw Style' , [line .get_drawstyle ()] + drawstyles ),
84
89
('Width' , line .get_linewidth ()),
85
90
('Color' , color ),
86
91
sep ,
@@ -91,8 +96,9 @@ def figure_edit(axes, parent=None):
91
96
('Edgecolor' , ec ),
92
97
]
93
98
curves .append ([curvedata , label , "" ])
94
- # make sure that there is at least one displayed curve
95
- has_curve = bool (curves )
99
+
100
+ # make sure that there is at least one displayed curve
101
+ has_curve = bool (curves )
96
102
97
103
datalist = [(general , "Axes" , "" )]
98
104
if has_curve :
@@ -120,11 +126,12 @@ def apply_callback(data):
120
126
# Set / Curves
121
127
for index , curve in enumerate (curves ):
122
128
line = linedict [curvelabels [index ]]
123
- label , linestyle , linewidth , color , \
129
+ label , linestyle , drawstyle , linewidth , color , \
124
130
marker , markersize , markerfacecolor , markeredgecolor \
125
131
= curve
126
132
line .set_label (label )
127
133
line .set_linestyle (linestyle )
134
+ line .set_drawstyle (drawstyle )
128
135
line .set_linewidth (linewidth )
129
136
line .set_color (color )
130
137
if marker is not 'none' :
0 commit comments