Skip to content
Snippets Groups Projects
Commit 8140d77a authored by Clara Betancourt's avatar Clara Betancourt
Browse files

map plot colors and shapes

parent b3a90605
Branches
Tags
No related merge requests found
......@@ -18,12 +18,12 @@ class MapPlot:
# name of the file where data is stored / read from
self.data = pd.read_csv(resources_dir + AQbench_dataset_file)
self.available_colors =\
['red', 'blue', 'green', 'yellow', 'cyan', 'magenta',
'orangered', 'sienna', 'chocolate', 'orange', 'goldenrod',
['orangered', 'turquoise', 'green', 'yellow', 'cyan', 'magenta',
'hotpink', 'sienna', 'chocolate', 'orange', 'goldenrod',
'gold', 'olive', 'yellowgreen', 'lawngreen', 'limegreen',
'springgreen', 'turquoise', 'teal', 'deepskyblue', 'dodgerblue',
'springgreen', 'blue', 'teal', 'deepskyblue', 'dodgerblue',
'navy', 'mediumslateblue', 'blueviolet', 'violet',
'mediumvioletred', 'deeppink', 'hotpink']
'mediumvioletred', 'deeppink', 'red']
self.available_markers =\
['o', 's', 'D', '*', 'P', 'p', 'd', 'X', 'v', '^', '<', '>']
......@@ -36,7 +36,8 @@ class MapPlot:
def plot(self, annotate=False):
ax = plt.axes(projection=cartopy.crs.PlateCarree())
ax.add_feature(cartopy.feature.COASTLINE)
ax.add_feature(cartopy.feature.BORDERS, linestyle=':')
# No borders due to political reasons
# ax.add_feature(cartopy.feature.BORDERS, linestyle=':')
ax.add_feature(cartopy.feature.LAND)
ax.add_feature(cartopy.feature.OCEAN)
......@@ -47,10 +48,10 @@ class MapPlot:
x, y = lons, lats
ax.scatter(x, y,
s=50,
s=12,
color=self.colors[i],
marker=self.markers[i],
alpha=0.5,
alpha=0.7,
edgecolor='black',
label=self.labels[i],
zorder=2)
......@@ -124,7 +125,7 @@ class MapPlot:
self.data_plot = [train_pd, val_pd, test_pd]
self.labels = ['training set', 'validation set', 'test set']
self.colors = self.available_colors[:len(self.labels)]
self.markers = self.available_markers[:len(self.labels)]
self.markers = self.available_markers[0] * 3 # [:len(self.labels)]
self.plot()
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment