Skip to content

Minor fixes and internal improvements #325

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# WARNING: Make sure to keep flags in sync with ci/run-linter.sh
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.1.0
rev: v4.1.0
hooks:
- id: double-quote-string-fixer
- id: check-docstring-first
Expand All @@ -12,28 +12,28 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/pre-commit/mirrors-isort
rev: v4.3.21
rev: v5.10.1
hooks:
- id: isort
args: ['--line-width=88', '--multi-line=3', '--force-grid-wrap=0', '--trailing-comma']
exclude: '(^docs|__init__)'

- repo: https://github.com/PyCQA/flake8
rev: 3.8.3
rev: 4.0.1
hooks:
- id: flake8
args: ['--max-line-length=88', '--ignore=W503,E402,E741']

# apply once this handles long tables better
# - repo: https://github.com/PyCQA/doc8
# rev: 0.8.1
# rev: 0.10.1
# hooks:
# - id: doc8
# args: ['--max-line-length', '88', '--allow-long-titles']

# apply after function keyword args can be ignored
# - repo: https://github.com/ambv/black
# rev: 19.10
# rev: 22.1.0
# hooks:
# - id: black
# args: ['--line-length', '88', '--skip-string-normalization']
6 changes: 5 additions & 1 deletion WHATSNEW.rst
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,11 @@ Bug fixes
arrays to plotting methods (:issue:`320`).
* Fix issue where list-of-string colors passed to `~proplot.axes.Axes.scatter`
are interpreted as data values (:issue:`316`).
* Fix issue where settings passed to `~proplot.axes.Axes.colorbar` after e.g.
* Fix issue where *x* and *y* axis limits are reversed when passing to
`~matplotlib.axes.Axes.hexbin` and `~matplotlib.axes.Axes.hist2d` (:issue:`334`).
* Fix regression where *x* or *y* axis limits are reversed when passing to
`~matplotlib.axes.Axes.hist` and `~matplotlib.axes.Axes.histh` (:issue:`334`).
* Fix issue where settings passed to `~proplot.axes.Axes.colorbar` after calling e.g.
`~proplot.axes.PlotAxes.pcolor` with `colorbar_kw` are ignored (:issue:`314`).
* Fix issues where passing the colorbar `orientation` without a `loc`, or using a non-
standard `orientation` for a given `loc`, triggers tickloc error (:issue:`314`).
Expand Down
2 changes: 1 addition & 1 deletion ci/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dependencies:
- pip:
- ..
- flake8
- isort==4.3.21
- isort
- black
- doc8
- pytest
Expand Down
3 changes: 2 additions & 1 deletion proplot/axes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1175,8 +1175,9 @@ def _add_colorbar(
if obj.dividers is not None:
obj.dividers.update(kw_outline)
if obj.solids:
from . import PlotAxes
obj.solids.set_rasterized(rasterized)
cax._fix_patch_edges(obj.solids, edgefix=edgefix)
PlotAxes._fix_patch_edges(obj.solids, edgefix=edgefix)

# Register location and return
self._register_guide('colorbar', obj, (loc, align)) # possibly replace another
Expand Down
4 changes: 4 additions & 0 deletions proplot/axes/geo.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,10 @@ def format(
rc_kw['grid.labelweight'] = labelweight
with rc.context(rc_kw, mode=rc_mode):
# Apply extent mode first
# NOTE: We deprecate autoextent on _CartopyAxes with _rename_kwargs which
# does not translate boolean flag. So here apply translation.
if extent is not None and not isinstance(extent, str):
extent = ('globe', 'auto')[int(bool(extent))]
self._update_boundary(round)
self._update_extent_mode(extent, boundinglat)

Expand Down
Loading