Skip to content

Commit

Permalink
missing coverage changes from geopandas#3001
Browse files Browse the repository at this point in the history
  • Loading branch information
m-richards committed Nov 21, 2023
1 parent 73b8968 commit 12df692
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
8 changes: 0 additions & 8 deletions geopandas/geodataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
from geopandas.geoseries import GeoSeries
import geopandas.io
from geopandas.explore import _explore
from . import _compat as compat
from ._decorator import doc


Expand Down Expand Up @@ -1555,13 +1554,6 @@ def apply(self, func, axis=0, raw=False, result_type=None, args=(), **kwargs):
result = super().apply(
func, axis=axis, raw=raw, result_type=result_type, args=args, **kwargs
)
# pandas <1.4 re-attach last geometry col if lost
if (
not compat.PANDAS_GE_14
and isinstance(result, GeoDataFrame)
and result._geometry_column_name is None
):
result._geometry_column_name = self._geometry_column_name
# Reconstruct gdf if it was lost by apply
if (
isinstance(result, DataFrame)
Expand Down
9 changes: 1 addition & 8 deletions geopandas/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,10 @@ def _expand_kwargs(kwargs, multiindex):
it (in place) to the correct length/formats with help of 'multiindex', unless
the value appears to already be a valid (single) value for the key.
"""
import matplotlib
from matplotlib.colors import is_color_like
from typing import Iterable

mpl = Version(matplotlib.__version__)
if mpl >= Version("3.4"):
# alpha is supported as array argument with matplotlib 3.4+
scalar_kwargs = ["marker", "path_effects"]
else:
scalar_kwargs = ["marker", "alpha", "path_effects"]

scalar_kwargs = ["marker", "path_effects"]
for att, value in kwargs.items():
if "color" in att: # color(s), edgecolor(s), facecolor(s)
if is_color_like(value):
Expand Down

0 comments on commit 12df692

Please sign in to comment.