@@ -196,18 +196,18 @@ def _set_tick_formatter(channel, ax):
196196 raise NotImplementedError # Nominal and Ordinal go here
197197
198198
199- def _set_label_angle (channel , axis ):
199+ def _set_label_angle (channel , ax ):
200200 """Set the label angle. TODO: handle axis.labelAngle from Altair
201201
202202 Parameters
203203 ----------
204- channel : dict
204+ channel : parse_chart.ChannelMetadata
205205 The mapping of the channel data and metadata
206- axis : dict
206+ axis : matplotlib.axes
207207 The mapping of the axis metadata and the scale data
208208 """
209- if channel [ 'dtype' ] == 'temporal' and channel [ 'axis' ] == 'x' :
210- for label in channel [ 'ax' ] .get_xticklabels ():
209+ if channel . type == 'temporal' and channel . channel == 'x' :
210+ for label in ax .get_xticklabels ():
211211 # Rotate the labels on the x-axis so they don't run into each other.
212212 label .set_rotation (30 )
213213 label .set_ha ('right' )
@@ -228,7 +228,7 @@ def convert_axis(ax, chart):
228228 _set_limits (channel , chart .mark , ax )
229229 _set_tick_locator (channel , ax )
230230 _set_tick_formatter (channel , ax )
231- # _set_label_angle(channel, ax)
231+ _set_label_angle (channel , ax )
232232
233233 # for channel in chart.to_dict()['encoding']:
234234 # if channel in ['x', 'y']:
0 commit comments