We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc3b635 commit 4794414Copy full SHA for 4794414
mplaltair/_axis.py
@@ -43,6 +43,25 @@ def _set_label_angle(ax, enc, spec):
43
for label in ax.get_yticklables():
44
label.set_rotation(-1*label_angle)
45
46
+def _set_axis_orientation(ax, enc, spec):
47
+ orient = spec.get('axis').get('orient')
48
+
49
+ if orient is None:
50
+ return
51
52
+ ACTIONS = {
53
+ 'x': {
54
+ 'top': ax.xaxis.tick_top,
55
+ 'bottom': ax.xaxis.tick_bottom
56
+ },
57
+ 'y': {
58
+ 'left': ax.xaxis.tick_left,
59
+ 'right': ax.xaxis.tick_right
60
+ }
61
62
63
+ ACTIONS[enc][orient]()
64
65
def _set_ticks(ax, enc, spec):
66
pass
67
@@ -76,5 +95,6 @@ def convert_axis(ax, chart):
76
95
_set_title(ax, enc_channel, enc_spec)
77
96
_set_label_visibility(ax, enc_channel, enc_spec)
78
97
_set_label_angle(ax, enc_channel, enc_spec)
98
+ _set_axis_orientation(ax, enc_channel, enc_spec)
79
99
_set_ticks(ax, enc_channel, enc_spec)
80
100
_set_locators(ax, enc_channel, enc_spec)
0 commit comments