No flags found
Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.
e.g., #unittest #integration
#production #enterprise
#frontend #backend
2adfb41
... +0 ...
77e60be
Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.
e.g., #unittest #integration
#production #enterprise
#frontend #backend
71 | 71 | y_is_log = is_log(y_scale) |
|
72 | 72 | if isinstance(coord, coord_flip): |
|
73 | 73 | x_is_log, y_is_log = y_is_log, x_is_log |
|
74 | + | x_scale, y_scale = y_scale, x_scale |
|
75 | + | base_x, base_y = base_y, base_x |
|
74 | 76 | ||
75 | 77 | if 't' in sides or 'b' in sides: |
|
76 | 78 | if base_x is None: |
163 | 165 | 'alpha': params['alpha'], |
|
164 | 166 | 'linetype': params['linetype'] |
|
165 | 167 | } |
|
168 | + | # these are already flipped iff coord_flip |
|
166 | 169 | base_x, base_y = self._check_log_scale( |
|
167 | 170 | params['base'], sides, panel_params, coord) |
|
168 | 171 | ||
169 | 172 | if 'b' in sides or 't' in sides: |
|
170 | - | tick_positions = self._calc_ticks(panel_params.x.range, base_x) |
|
173 | + | if isinstance(coord, coord_flip): |
|
174 | + | tick_range = panel_params.y.range |
|
175 | + | else: |
|
176 | + | tick_range = panel_params.x.range |
|
177 | + | tick_positions = self._calc_ticks(tick_range, base_x) |
|
171 | 178 | for (positions, length) in zip(tick_positions, lengths): |
|
172 | 179 | data = pd.DataFrame(dict(x=positions, **_aesthetics)) |
|
173 | 180 | super().draw_group(data, panel_params, coord, ax, |
|
174 | 181 | length=length, **params) |
|
175 | 182 | ||
176 | 183 | if 'l' in sides or 'r' in sides: |
|
177 | - | tick_positions = self._calc_ticks(panel_params.y.range, base_y) |
|
184 | + | if isinstance(coord, coord_flip): |
|
185 | + | tick_range = panel_params.x.range |
|
186 | + | else: |
|
187 | + | tick_range = panel_params.y.range |
|
188 | + | tick_positions = self._calc_ticks(tick_range, base_y) |
|
178 | 189 | for (positions, length) in zip(tick_positions, lengths): |
|
179 | 190 | data = pd.DataFrame(dict(y=positions, **_aesthetics)) |
|
180 | 191 | super().draw_group(data, panel_params, coord, ax, |
Learn more Showing 1 files with coverage changes found.
plotnine/geoms/annotation_logticks.py
77e60be
2adfb41