Skip to content
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

Update default for add_id in plot methods #529

Merged
merged 4 commits into from
Nov 18, 2024
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ _Add new changes here_
- Metrics are now stored in a nested dictionary (e.g. `metrics['train']['loss']` instead of `metrics["epoch_loss_train]`) ([#511](https://github.com/maps-as-data/MapReader/pull/511))
- `plot_metric` method is simplified - see updated docs ([#511](https://github.com/maps-as-data/MapReader/pull/511))
- Renamed `show_parent` as `show_patches` ([#511](https://github.com/maps-as-data/MapReader/pull/511))
- Default value for `add_id` argument when plotting metadata in `SheetDownloader` is now `False` ([#529](https://github.com/maps-as-data/MapReader/pull/529))

## [v1.5.1](https://github.com/Living-with-machines/MapReader/releases/tag/v1.5.1) (2024-10-30)

Expand Down
12 changes: 6 additions & 6 deletions mapreader/download/sheet_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -1131,7 +1131,7 @@ def plot_features_on_map(
self,
features: gpd.GeoDataFrame,
map_extent: str | (list | tuple) | None = None,
add_id: bool | None = True,
add_id: bool = False,
) -> None:
"""
Plot boundaries of map sheets on a map using cartopy.
Expand All @@ -1146,7 +1146,7 @@ def plot_features_on_map(
If None, the map extent will be set automatically.
By default None.
add_id : bool, optional
Whether to add an ID (WFS ID number) to each map sheet, by default True.
Whether to add an ID (WFS ID number) to each map sheet, by default False.
"""
plt.figure(figsize=[15, 15])

Expand Down Expand Up @@ -1188,7 +1188,7 @@ def plot_features_on_map(
def plot_all_metadata_on_map(
self,
map_extent: str | (list | tuple) | None = None,
add_id: bool | None = True,
add_id: bool = False,
) -> None:
"""
Plots boundaries of all map sheets in metadata on a map using cartopy.
Expand All @@ -1203,15 +1203,15 @@ def plot_all_metadata_on_map(
If None, the map extent will be set automatically.
By default None.
add_id : bool, optional
Whether to add an ID (WFS ID number) to each map sheet, by default True.
Whether to add an ID (WFS ID number) to each map sheet, by default False.
"""

self.plot_features_on_map(self.metadata, map_extent, add_id)

def plot_queries_on_map(
self,
map_extent: str | (list | tuple) | None = None,
add_id: bool | None = True,
add_id: bool = False,
) -> None:
"""
Plots boundaries of query results on a map using cartopy.
Expand All @@ -1226,7 +1226,7 @@ def plot_queries_on_map(
If None, the map extent will be set automatically.
By default None.
add_id : bool, optional
Whether to add an ID (WFS ID number) to each map sheet, by default True.
Whether to add an ID (WFS ID number) to each map sheet, by default False.
"""

self.plot_features_on_map(self.found_queries, map_extent, add_id)
Loading