Skip to content

Commit

Permalink
ENH: Rename maps to layers
Browse files Browse the repository at this point in the history
Seems a bit clearer.
  • Loading branch information
dopplershift committed Jan 6, 2019
1 parent 2b43aa6 commit e16c0b5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/plots/Combined_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
# Plot the data on a map
panel = MapPanel()
panel.area = 'us'
panel.maps = ['coastline', 'borders', 'states', 'rivers', 'ocean', 'land']
panel.layers = ['coastline', 'borders', 'states', 'rivers', 'ocean', 'land']
panel.title = 'NARR Example'
panel.plots = [contour, img]

Expand Down
4 changes: 2 additions & 2 deletions metpy/plots/declarative.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ class MapPanel(Panel):
area = Union([Unicode(), Tuple(Float(), Float(), Float(), Float())], allow_none=True,
default_value=None)
projection = Union([Unicode(), Instance(ccrs.Projection)], default_value='data')
maps = List(Union([Unicode(), Instance(cfeature.Feature)]), default_value=['coastline'])
layers = List(Union([Unicode(), Instance(cfeature.Feature)]), default_value=['coastline'])
title = Unicode()

@observe('plots')
Expand Down Expand Up @@ -582,7 +582,7 @@ def _layer_features(self):
Handle converting names of maps to auto-scaling map features.
"""
for item in self.maps:
for item in self.layers:
if is_string_like(item):
item = item.upper()
try:
Expand Down
6 changes: 3 additions & 3 deletions metpy/plots/tests/test_declarative.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def test_declarative_contour():
panel = MapPanel()
panel.area = 'us'
panel.proj = 'lcc'
panel.maps = ['coastline', 'borders', 'usstates']
panel.layers = ['coastline', 'borders', 'usstates']
panel.plots = [contour]

pc = PanelContainer()
Expand Down Expand Up @@ -97,7 +97,7 @@ def test_declarative_events():
panel = MapPanel()
panel.area = 'us'
panel.proj = 'lcc'
panel.maps = ['coastline', 'borders', 'states']
panel.layers = ['coastline', 'borders', 'states']
panel.plots = [contour, img]

pc = PanelContainer()
Expand Down Expand Up @@ -140,7 +140,7 @@ def test_projection_object():
panel = MapPanel()
panel.area = (-110, -60, 25, 55)
panel.projection = ccrs.Mercator()
panel.maps = [cfeature.LAKES]
panel.layers = [cfeature.LAKES]
panel.plots = [contour]

pc = PanelContainer()
Expand Down

0 comments on commit e16c0b5

Please sign in to comment.