Skip to content

Commit 345f786

Browse files
committed
renamed sample_data_3d to sample_data_map
1 parent 46b132d commit 345f786

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ helper functions for cartopy and matplotlib
1515
* `pad` and `size` are now scaled by the width/ height of the axes (was width/ height of the figure)
1616
* `pad` now uses the matplotlib default (0.05 for vertical bars and 0.15 for horizontal colorbars)
1717
* add `_is_monotonic` to `infer_interval_breaks`
18+
* renamed `sample_data_3d` to `sample_data_map`
1819

1920
### 0.1.0 (13.03.2018)
2021

mplotutils/cartopy_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# =============================================================================
1515

1616

17-
def sample_data_3d(nlons, nlats):
17+
def sample_data_map(nlons, nlats):
1818
"""Returns `lons`, `lats`, and fake `data`
1919
2020
adapted from:
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from mplotutils import sample_data_3d
1+
from mplotutils import sample_data_map
22

33
import numpy as np
44

@@ -7,7 +7,7 @@ def test_data_shape():
77
nlons = 10
88
nlats = 20
99

10-
lon, lat, data = sample_data_3d(nlons, nlats)
10+
lon, lat, data = sample_data_map(nlons, nlats)
1111

1212
assert len(lon) == nlons
1313
assert len(lat) == nlats
@@ -17,7 +17,7 @@ def test_data_shape():
1717
nlons = 5
1818
nlats = 10
1919

20-
lon, lat, data = sample_data_3d(nlons, nlats)
20+
lon, lat, data = sample_data_map(nlons, nlats)
2121

2222
assert len(lon) == nlons
2323
assert len(lat) == nlats
@@ -27,15 +27,15 @@ def test_data_shape():
2727

2828
def test_lat():
2929

30-
__, lat, __ = sample_data_3d(36, 9)
30+
__, lat, __ = sample_data_map(36, 9)
3131

3232
expected_lat = np.arange(-80, 81, 20)
3333
assert np.allclose(lat, expected_lat)
3434

3535

3636
def test_lon():
3737

38-
lon, __, __ = sample_data_3d(36, 9)
38+
lon, __, __ = sample_data_map(36, 9)
3939

4040
expected_lon = np.arange(0, 351, 10)
4141
assert np.allclose(lon, expected_lon)

0 commit comments

Comments
 (0)