@@ -42,6 +42,7 @@ def __init__(
42
42
line_color : int = 0xFFFFFF ,
43
43
ticksx : Union [np .array , list ] = np .array ([0 , 10 , 30 , 50 , 70 , 90 ]),
44
44
ticksy : Union [np .array , list ] = np .array ([0 , 10 , 30 , 50 , 70 , 90 ]),
45
+ tick_pos : bool = False ,
45
46
fill : bool = False ,
46
47
) -> None :
47
48
"""
@@ -54,12 +55,19 @@ def __init__(
54
55
:param int|None line_color: line color. Defaults to None
55
56
:param np.array|list ticksx: X axis ticks values
56
57
:param np.array|list ticksy: Y axis ticks values
58
+ :param bool tick_pos: indicates ticks position. True for below the axes. Defaults to ``False``
57
59
:param bool fill: enable the filling of the plot. Defaults to ``False``
58
60
59
61
"""
60
62
self .points = []
61
63
self .ticksx = np .array (ticksx )
62
64
self .ticksy = np .array (ticksy )
65
+ if tick_pos :
66
+ self ._tickposx = plot ._tickheightx
67
+ self ._tickposy = plot ._tickheighty
68
+ else :
69
+ self ._tickposx = 0
70
+ self ._tickposy = 0
63
71
64
72
plot ._plot_palette [plot ._index_colorused ] = line_color
65
73
@@ -143,9 +151,9 @@ def _draw_ticks(self, plot) -> None:
143
151
draw_line (
144
152
plot ._plotbitmap ,
145
153
tick ,
146
- plot ._newymin ,
154
+ plot ._newymin + self . _tickposx ,
147
155
tick ,
148
- plot ._newymin - plot ._tickheightx ,
156
+ plot ._newymin - plot ._tickheightx + self . _tickposx ,
149
157
2 ,
150
158
)
151
159
if plot ._showtext :
@@ -155,9 +163,9 @@ def _draw_ticks(self, plot) -> None:
155
163
for i , tick in enumerate (ticksynorm ):
156
164
draw_line (
157
165
plot ._plotbitmap ,
158
- plot ._newxmin ,
166
+ plot ._newxmin - self . _tickposy ,
159
167
tick ,
160
- plot ._newxmin + plot ._tickheighty ,
168
+ plot ._newxmin + plot ._tickheighty - self . _tickposy ,
161
169
tick ,
162
170
2 ,
163
171
)
0 commit comments