-
Notifications
You must be signed in to change notification settings - Fork 0
/
lat_lon_full_data_tectonics.py
56 lines (40 loc) · 2.05 KB
/
lat_lon_full_data_tectonics.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import matplotlib
matplotlib.use("Agg")
from matplotlib import pyplot as plt
import pandas as pd
import matplotlib.patches as mpatches
import sys
target = '/exports/csce/datastore/geos/users/s1134744/LSDTopoTools/Topographic_projects/'
source_list = ['full_himalaya/raw/full_data.csv']#,'full_himalaya/full_data.csv','full_himalaya_5000/raw/full_data.csv','full_himalaya_5000/full_data.csv']
colours = ['b','g','r','y']
numbers = [1,2,3,4]
legends = []
names = ['Sub Himalaya','Lesser Himalaya','Greater Himalaya', 'Tethyan Himalaya']
for x,y,name in zip(numbers,colours,names):
with open(target+'full_himalaya/raw/full_data.csv','r') as csvfile:
pandasDF = pd.read_csv(csvfile,delimiter=',')
pandasDF = pandasDF[pandasDF['quaternary_burned_data'] == x]
#pandasDF = pandasDF[pandasDF['longitude'] > 85]
#pandasDF = pandasDF[pandasDF['longitude'] < 90]
#pandasDF = pandasDF[pandasDF['distance_along'] < 1000]
#pandasDF = pandasDF[pandasDF['distance_along'] > 150]
x_Series = pandasDF['longitude']
y_Series = pandasDF['latitude']
fig = plt.figure(1, figsize=(18,6))
ax = fig.add_subplot(111)
plt.scatter(x_Series,y_Series,marker='.',s=0.1, c=y)
legend = mpatches.Patch(color=y, label=name)
legends.append(legend)
#plt.legend(handles=[red_patch])
#plt.gca().invert_xaxis()
#matplotlib.axes.Axes.invert_xaxis
#ax.hist2d(x_Series,y_Series,bins=(40,40),range=((150,1000),(0,3000)))
#plt.ylim(0,200)
#cb = plt.colorbar()
plt.axes().set_aspect('equal', 'datalim')
plt.xticks(range(76,96,1))
plt.xlabel("Degrees Longitude")
plt.ylabel("Degrees Latitude")
leg = plt.legend(handles=legends,ncol=4,loc='upper center', bbox_to_anchor=(0.5, -0.1))
leg.get_frame().set_alpha(1)
fig.savefig(target+'figures_to_keep/lat_lon_full_data_tectonics.png', bbox_inches='tight')