has2k1 / plotnine

Compare 2adfb41 ... +0 ... 77e60be

Coverage Reach
geoms/geom_path.py geoms/geom.py geoms/geom_boxplot.py geoms/geom_dotplot.py geoms/annotation_logticks.py geoms/geom_text.py geoms/annotation_stripes.py geoms/geom_violin.py geoms/geom_map.py geoms/geom_crossbar.py geoms/geom_raster.py geoms/geom_rect.py geoms/geom_rug.py geoms/__init__.py geoms/geom_polygon.py geoms/geom_abline.py geoms/geom_vline.py geoms/geom_smooth.py geoms/annotate.py geoms/geom_ribbon.py geoms/geom_point.py geoms/geom_step.py geoms/geom_segment.py geoms/geom_hline.py geoms/geom_errorbar.py geoms/geom_errorbarh.py geoms/geom_jitter.py geoms/geom_pointrange.py geoms/geom_bar.py geoms/geom_tile.py geoms/geom_spoke.py geoms/geom_label.py geoms/geom_linerange.py geoms/geom_area.py geoms/geom_blank.py geoms/geom_col.py geoms/geom_freqpoly.py geoms/geom_density.py geoms/geom_quantile.py geoms/geom_line.py geoms/geom_sina.py geoms/geom_density_2d.py geoms/geom_pointdensity.py geoms/geom_bin2d.py geoms/geom_qq_line.py geoms/geom_count.py geoms/geom_qq.py geoms/geom_histogram.py stats/smoothers.py stats/stat_bindot.py stats/stat.py stats/stat_ellipse.py stats/binning.py stats/stat_sina.py stats/stat_summary.py stats/stat_density.py stats/stat_density_2d.py stats/stat_bin_2d.py stats/stat_boxplot.py stats/stat_ydensity.py stats/stat_smooth.py stats/stat_summary_bin.py stats/stat_function.py stats/density.py stats/stat_bin.py stats/stat_qq_line.py stats/stat_count.py stats/stat_quantile.py stats/stat_pointdensity.py stats/stat_qq.py stats/stat_sum.py stats/__init__.py stats/distributions.py stats/stat_ecdf.py stats/stat_hull.py stats/stat_identity.py stats/stat_unique.py scales/scale.py scales/scale_color.py scales/scales.py scales/scale_xy.py scales/limits.py scales/__init__.py scales/scale_size.py scales/scale_manual.py scales/scale_identity.py scales/scale_alpha.py scales/scale_stroke.py scales/scale_shape.py scales/scale_linetype.py scales/range.py themes/themeable.py themes/elements.py themes/theme.py themes/seaborn_rcmod.py themes/theme_xkcd.py themes/theme_matplotlib.py themes/__init__.py themes/theme_gray.py themes/theme_538.py themes/theme_seaborn.py themes/theme_linedraw.py themes/theme_classic.py themes/theme_void.py themes/theme_light.py themes/theme_bw.py themes/theme_dark.py themes/theme_minimal.py facets/facet.py facets/strips.py facets/facet_wrap.py facets/facet_grid.py facets/layout.py facets/labelling.py facets/facet_null.py facets/__init__.py guides/guide_colorbar.py guides/guide_legend.py guides/guides.py guides/guide.py guides/guide_axis.py guides/__init__.py utils.py positions/position.py positions/position_dodge2.py positions/position_dodge.py positions/position_stack.py positions/position_jitterdodge.py positions/position_jitter.py positions/position_nudge.py positions/__init__.py positions/position_identity.py positions/position_fill.py ggplot.py mapping/aes.py mapping/evaluation.py mapping/__init__.py layer.py coords/coord.py coords/coord_trans.py coords/coord_flip.py coords/coord_cartesian.py coords/coord_fixed.py coords/__init__.py doctools.py qplot.py animation.py data/__init__.py labels.py __init__.py options.py exceptions.py watermark.py

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

Learn more about Codecov Flags here.


@@ -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,

Learn more Showing 1 files with coverage changes found.

Changes in plotnine/geoms/annotation_logticks.py
-1
-2
+3
Loading file...
Files Coverage
plotnine/__init__.py 100.00%
plotnine/animation.py 93.44%
plotnine/coords/__init__.py 100.00%
plotnine/coords/coord.py 93.84%
plotnine/coords/coord_cartesian.py 92.85%
plotnine/coords/coord_fixed.py 100.00%
plotnine/coords/coord_flip.py 96.66%
plotnine/coords/coord_trans.py 88.00%
plotnine/data/__init__.py 100.00%
plotnine/doctools.py 95.55%
plotnine/exceptions.py 94.11%
plotnine/facets/__init__.py 100.00%
plotnine/facets/facet.py 85.00%
plotnine/facets/facet_grid.py 82.75%
plotnine/facets/facet_null.py 90.90%
plotnine/facets/facet_wrap.py 76.92%
plotnine/facets/labelling.py 87.09%
plotnine/facets/layout.py 87.23%
plotnine/facets/strips.py 97.77%
plotnine/geoms/__init__.py 100.00%
plotnine/geoms/annotate.py 79.48%
plotnine/geoms/annotation_logticks.py +3.88% 94.79%
plotnine/geoms/annotation_stripes.py 94.66%
plotnine/geoms/geom.py 89.16%
plotnine/geoms/geom_abline.py 90.90%
plotnine/geoms/geom_area.py 100.00%
plotnine/geoms/geom_bar.py 90.90%
plotnine/geoms/geom_bin2d.py 100.00%
plotnine/geoms/geom_blank.py 100.00%
plotnine/geoms/geom_boxplot.py 85.00%
plotnine/geoms/geom_col.py 100.00%
plotnine/geoms/geom_count.py 100.00%
plotnine/geoms/geom_crossbar.py 92.42%
plotnine/geoms/geom_density.py 100.00%
plotnine/geoms/geom_density_2d.py 100.00%
plotnine/geoms/geom_dotplot.py 91.00%
plotnine/geoms/geom_errorbar.py 88.88%
plotnine/geoms/geom_errorbarh.py 88.88%
plotnine/geoms/geom_freqpoly.py 100.00%
plotnine/geoms/geom_histogram.py 100.00%
plotnine/geoms/geom_hline.py 97.05%
plotnine/geoms/geom_jitter.py 88.00%
plotnine/geoms/geom_label.py 76.47%
plotnine/geoms/geom_line.py 100.00%
plotnine/geoms/geom_linerange.py 100.00%
plotnine/geoms/geom_map.py 78.57%
plotnine/geoms/geom_path.py 94.68%
plotnine/geoms/geom_point.py 100.00%
plotnine/geoms/geom_pointdensity.py 100.00%
plotnine/geoms/geom_pointrange.py 100.00%
plotnine/geoms/geom_polygon.py 100.00%
plotnine/geoms/geom_qq.py 100.00%
plotnine/geoms/geom_qq_line.py 100.00%
plotnine/geoms/geom_quantile.py 100.00%
plotnine/geoms/geom_raster.py 76.92%
plotnine/geoms/geom_rect.py 100.00%
plotnine/geoms/geom_ribbon.py 79.48%
plotnine/geoms/geom_rug.py 96.00%
plotnine/geoms/geom_segment.py 100.00%
plotnine/geoms/geom_sina.py 100.00%
plotnine/geoms/geom_smooth.py 92.68%
plotnine/geoms/geom_spoke.py 100.00%
plotnine/geoms/geom_step.py 94.59%
plotnine/geoms/geom_text.py 72.82%
plotnine/geoms/geom_tile.py 81.81%
plotnine/geoms/geom_violin.py 98.59%
plotnine/geoms/geom_vline.py 100.00%
plotnine/ggplot.py 90.88%
plotnine/guides/__init__.py 100.00%
plotnine/guides/guide.py 79.16%
plotnine/guides/guide_axis.py 0.00%
plotnine/guides/guide_colorbar.py 66.66%
plotnine/guides/guide_legend.py 74.74%
plotnine/guides/guides.py 78.12%
plotnine/labels.py 96.66%
plotnine/layer.py 93.66%
plotnine/mapping/__init__.py 100.00%
plotnine/mapping/aes.py 91.25%
plotnine/mapping/evaluation.py 72.30%
plotnine/options.py 50.00%
plotnine/positions/__init__.py 100.00%
plotnine/positions/position.py 81.48%
plotnine/positions/position_dodge.py 83.05%
plotnine/positions/position_dodge2.py 87.32%
plotnine/positions/position_fill.py 100.00%
plotnine/positions/position_identity.py 100.00%
plotnine/positions/position_jitter.py 85.71%
plotnine/positions/position_jitterdodge.py 83.33%
plotnine/positions/position_nudge.py 92.85%
plotnine/positions/position_stack.py 81.03%
plotnine/qplot.py 66.07%
plotnine/scales/__init__.py 100.00%
plotnine/scales/limits.py 75.25%
plotnine/scales/range.py 92.30%
plotnine/scales/scale.py 68.17%
plotnine/scales/scale_alpha.py 100.00%
plotnine/scales/scale_color.py 97.91%
plotnine/scales/scale_identity.py 89.74%
plotnine/scales/scale_linetype.py 90.47%
plotnine/scales/scale_manual.py 89.58%
plotnine/scales/scale_shape.py 92.30%
plotnine/scales/scale_size.py 100.00%
plotnine/scales/scale_stroke.py 78.57%
plotnine/scales/scale_xy.py 85.15%
plotnine/scales/scales.py 90.00%
plotnine/stats/__init__.py 100.00%
plotnine/stats/binning.py 76.76%
plotnine/stats/density.py 51.21%
plotnine/stats/distributions.py 50.00%
plotnine/stats/smoothers.py 80.37%
plotnine/stats/stat.py 92.10%
plotnine/stats/stat_bin.py 86.84%
plotnine/stats/stat_bin_2d.py 94.28%
plotnine/stats/stat_bindot.py 79.82%
plotnine/stats/stat_boxplot.py 83.58%
plotnine/stats/stat_count.py 87.50%
plotnine/stats/stat_density.py 92.85%
plotnine/stats/stat_density_2d.py 89.33%
plotnine/stats/stat_ecdf.py 90.47%
plotnine/stats/stat_ellipse.py 71.28%
plotnine/stats/stat_function.py 100.00%
plotnine/stats/stat_hull.py 100.00%
plotnine/stats/stat_identity.py 100.00%
plotnine/stats/stat_pointdensity.py 90.32%
plotnine/stats/stat_qq.py 88.88%
plotnine/stats/stat_qq_line.py 88.88%
plotnine/stats/stat_quantile.py 84.37%
plotnine/stats/stat_sina.py 73.95%
plotnine/stats/stat_smooth.py 76.36%
plotnine/stats/stat_sum.py 92.59%
plotnine/stats/stat_summary.py 86.02%
plotnine/stats/stat_summary_bin.py 77.35%
plotnine/stats/stat_unique.py 87.50%
plotnine/stats/stat_ydensity.py 72.58%
plotnine/themes/__init__.py 100.00%
plotnine/themes/elements.py 72.72%
plotnine/themes/seaborn_rcmod.py 59.78%
plotnine/themes/theme.py 80.00%
plotnine/themes/theme_538.py 100.00%
plotnine/themes/theme_bw.py 100.00%
plotnine/themes/theme_classic.py 100.00%
plotnine/themes/theme_dark.py 100.00%
plotnine/themes/theme_gray.py 100.00%
plotnine/themes/theme_light.py 100.00%
plotnine/themes/theme_linedraw.py 100.00%
plotnine/themes/theme_matplotlib.py 65.00%
plotnine/themes/theme_minimal.py 100.00%
plotnine/themes/theme_seaborn.py 100.00%
plotnine/themes/theme_void.py 100.00%
plotnine/themes/theme_xkcd.py 92.85%
plotnine/themes/themeable.py 89.30%
plotnine/utils.py 79.06%
plotnine/watermark.py 93.75%
Project Totals (153 files) 85.25%
Loading