Skip to content

Commit 75e00e9

Browse files
committed
add comment for get_axisbelow()
1 parent cf41877 commit 75e00e9

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

matplotlib2tikz/axes.py

+12-2
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ def __init__(self, data, obj):
7070
"log basis y={{{}}}".format(_try_f2i(obj.yaxis._scale.base))
7171
)
7272

73+
# Possible values for get_axisbelow():
74+
# True (zorder = 0.5): Ticks and gridlines are below all Artists.
75+
# 'line' (zorder = 1.5): Ticks and gridlines are above patches (e.g.
76+
# rectangles) but still below lines / markers.
77+
# False (zorder = 2.5): Ticks and gridlines are above patches and lines /
78+
# markers.
7379
if not obj.get_axisbelow():
7480
self.axis_options.append("axis on top")
7581

@@ -195,9 +201,13 @@ def _ticks(self, data, obj):
195201
)
196202
)
197203

198-
data, xtickcolor, _ = color.mpl_color2xcolor(data, obj.get_xticklines()[0].get_color())
204+
data, xtickcolor, _ = color.mpl_color2xcolor(
205+
data, obj.get_xticklines()[0].get_color()
206+
)
199207
self.axis_options.append("xtick style={{color={}}}".format(xtickcolor))
200-
data, ytickcolor, _ = color.mpl_color2xcolor(data, obj.get_xticklines()[0].get_color())
208+
data, ytickcolor, _ = color.mpl_color2xcolor(
209+
data, obj.get_xticklines()[0].get_color()
210+
)
201211
self.axis_options.append("ytick style={{color={}}}".format(ytickcolor))
202212

203213
# Find tick direction

0 commit comments

Comments
 (0)