Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AQ-Bench
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
esde
machine-learning
AQ-Bench
Commits
7465e005
Commit
7465e005
authored
4 years ago
by
Timo Stomberg
Browse files
Options
Downloads
Patches
Plain Diff
cartopy instead of basemaps
parent
23bb8179
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/dataset_mapplot.py
+15
-14
15 additions, 14 deletions
source/dataset_mapplot.py
with
15 additions
and
14 deletions
source/dataset_mapplot.py
+
15
−
14
View file @
7465e005
import
numpy
as
np
import
numpy
as
np
import
pandas
as
pd
import
pandas
as
pd
import
matplotlib.pyplot
as
plt
import
matplotlib.pyplot
as
plt
from
mpl_toolkits.basemap
import
Basemap
import
cartopy
import
random
import
random
from
settings
import
*
from
settings
import
*
...
@@ -35,18 +35,19 @@ class MapPlot:
...
@@ -35,18 +35,19 @@ class MapPlot:
self
.
markers
=
[]
self
.
markers
=
[]
def
plot
(
self
,
annotate
=
False
):
def
plot
(
self
,
annotate
=
False
):
tmap
=
Basemap
(
projection
=
'
cyl
'
,
resolution
=
'
l
'
)
ax
=
plt
.
axes
(
projection
=
cartopy
.
crs
.
PlateCarree
())
tmap
.
drawcoastlines
()
ax
.
add_feature
(
cartopy
.
feature
.
COASTLINE
)
tmap
.
fillcontinents
()
ax
.
add_feature
(
cartopy
.
feature
.
BORDERS
,
linestyle
=
'
:
'
)
tmap
.
drawcountries
()
ax
.
add_feature
(
cartopy
.
feature
.
LAND
)
ax
.
add_feature
(
cartopy
.
feature
.
OCEAN
)
for
i
in
range
(
len
(
self
.
data_plot
)):
for
i
in
range
(
len
(
self
.
data_plot
)):
lons
=
self
.
data_plot
[
i
][
'
lon
'
].
to_list
()
lons
=
self
.
data_plot
[
i
][
'
lon
'
].
to_list
()
lats
=
self
.
data_plot
[
i
][
'
lat
'
].
to_list
()
lats
=
self
.
data_plot
[
i
][
'
lat
'
].
to_list
()
x
,
y
=
tmap
(
lons
,
lats
)
x
,
y
=
lons
,
lats
tmap
.
scatter
(
x
,
y
,
ax
.
scatter
(
x
,
y
,
s
=
50
,
s
=
50
,
color
=
self
.
colors
[
i
],
color
=
self
.
colors
[
i
],
marker
=
self
.
markers
[
i
],
marker
=
self
.
markers
[
i
],
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment