has2k1 / plotnine

@@ -71,6 +71,8 @@
Loading
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,18 +165,27 @@
Loading
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,
Files Coverage
plotnine 85.25%
Project Totals (153 files) 85.25%
py3.6
Build #1257605253 -
py3.9
Build #1257605253 -
1
codecov:
2
  require_ci_to_pass: true
3
  token: 58d59fa2-ed00-4601-8824-ae0b4ec64ca3
4

5
comment:
6
   behavior: default
7
   branches:
8
      - 'master'
9

10
coverage:
11
   round: 'down'
12
   range: 90..100
13
   status:
14
      project:
15
         default:
16
            target: auto
17
            threshold: 0.5%
18

19
      # Lines adjusted in the PR
20
      patch:
21
         default:
22
            target: 75%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading