5252plt .savefig (os .path .join (dirName + '/' + Run_settings ["Lease_Name" ] + '_' + Formation_names + '_AttributeBoxplot' + '.eps' ),format = 'eps' ,dpi = 600 )
5353
5454
55+ fig , ((ax1 , ax2 ,), (ax3 , ax4 ), (ax5 , ax6 )) = plt .subplots (nrows = 3 , ncols = 2 , sharex = False , sharey = False , figsize = (10 ,15 ))
56+
57+ sns .scatterplot (x = attribute_plotted [0 ], y = attribute_plotted [2 ], hue = Run_settings ["RockClassification" ],data = coredata , palette = chemofacies_color ,ax = ax1 , edgecolor = 'black' )
58+ ax1 .legend ([])
59+
60+ sns .scatterplot (x = attribute_plotted [1 ], y = attribute_plotted [2 ], hue = Run_settings ["RockClassification" ],data = coredata , palette = chemofacies_color ,ax = ax2 , edgecolor = 'black' )
61+ ax2 .legend ([])
62+
63+ sns .scatterplot (x = attribute_plotted [3 ], y = attribute_plotted [0 ], hue = Run_settings ["RockClassification" ],data = coredata , palette = chemofacies_color ,ax = ax3 , edgecolor = 'black' )
64+ ax3 .legend ([])
65+ ax3 .set (xscale = "log" )
66+ ax3 .grid (which = 'minor' )
67+ ax3 .grid (which = 'major' )
68+
69+ sns .scatterplot (x = attribute_plotted [3 ], y = attribute_plotted [1 ], hue = Run_settings ["RockClassification" ],data = coredata , palette = chemofacies_color ,ax = ax4 , edgecolor = 'black' )
70+ ax4 .legend ([])
71+ ax4 .set (xscale = "log" )
72+ ax4 .grid (which = 'minor' )
73+ ax4 .grid (which = 'major' )
74+ #sns.scatterplot(x=Run_settings["Elements_plotted"][1], y=Run_settings["Elements_plotted"][7], hue=Run_settings["RockClassification"],data=coredata, palette=chemofacies_color,ax=ax5, edgecolor='black')
75+ #ax5.legend([])
76+
77+ #sns.scatterplot(x=Run_settings["Elements_plotted"][0], y=Run_settings["Elements_plotted"][9], hue=Run_settings["RockClassification"],data=coredata, palette=chemofacies_color,ax=ax6, edgecolor='black')
78+ #ax6.legend([])
79+
80+ plt .savefig (os .path .join (dirName + '/' + Run_settings ["Lease_Name" ] + '_' + Formation_names + '_AttributeCrossPlot_' + Run_settings ["RockClassification" ] + '.png' ),dpi = 300 )
81+ plt .savefig (os .path .join (dirName + '/' + Run_settings ["Lease_Name" ] + '_' + Formation_names + '_AttributeCrossPlot_' + Run_settings ["RockClassification" ] + '.eps' ),format = 'eps' ,dpi = 600 )
82+
83+
84+
85+
86+
87+
88+
89+
5590# This section defines descriptive statistics for each chemofacies. Median, Q3, and Q1
5691Median_calc = attributedata .groupby (Run_settings ["RockClassification" ]).quantile (0.50 )[attribute_plotted ]
5792Q3_calc = attributedata .groupby (Run_settings ["RockClassification" ]).quantile (0.75 )[attribute_plotted ]
85120
86121coredata = Attribute_corelog # cheating here. Should rename throughout
87122
123+ Depth_figure_top = min (Attribute_corelog [Run_settings ["Depth_model" ]])
124+ Depth_figure_bottom = max (Attribute_corelog [Run_settings ["Depth_model" ]])
125+
126+
127+ #Depth_figure_top = 10820
128+ #Depth_figure_bottom = 10892
129+
88130plt .subplot (1 , n , 1 )
89131for i in range (len (Attribute_corelog )):
90132 Q = [0 , 0 , coredata [Run_settings ["RockClassification" ]][i ]+ 2 , coredata [Run_settings ["RockClassification" ]][i ]+ 2 ]
91133 Z = [coredata [Run_settings ["Depth_model" ]][i ]+ Corebeta ["XRF_resolution" ], coredata [Run_settings ["Depth_model" ]][i ], coredata [Run_settings ["Depth_model" ]][i ], coredata [Run_settings ["Depth_model" ]][i ]+ Corebeta ["XRF_resolution" ]]
92134
93135 plt .fill (Q , Z ,c = chemofacies_color [coredata [Run_settings ["RockClassification" ]][i ]], linewidth = 0.0 )
94- plt .ylim (( max ( coredata [ Run_settings [ "Depth_model" ]]), min ( coredata [ Run_settings [ "Depth_model" ]])) )
136+ plt .ylim (Depth_figure_bottom , Depth_figure_top )
95137 plt .xlim ((0 ,6 ))
96138 plt .xlabel ("RockClass" , fontsize = 18 )
97139 plt .ylabel (Run_settings ["Depth_model" ], fontsize = 18 )
100142
101143
102144plt .subplot (1 , n , 2 )
103- y_av = corepy .movingaverage (Attribute_corelog [Run_settings ["Elements_plotted" ][2 ]] / Attribute_corelog [ Run_settings [ "Elements_plotted" ][ 1 ]], Run_settings ["moving_avg" ])
145+ y_av = corepy .movingaverage (Attribute_corelog [Run_settings ["Elements_plotted" ][10 ]], Run_settings ["moving_avg" ])
104146axs = plt .plot (y_av ,Attribute_corelog [Run_settings ["Depth_model" ]], color = 'blue' )
105147#plt.xlim([0,10])
106- plt .ylim (( max ( Attribute_corelog [ Run_settings [ "Depth_model" ]]), min ( Attribute_corelog [ Run_settings [ "Depth_model" ]])) )
107- plt .yticks ([])
148+ plt .ylim (Depth_figure_bottom , Depth_figure_top )
149+ # plt.yticks([])
108150plt .xticks (fontsize = 14 )
109151#plt.xscale('log')
110152plt .xlabel (Run_settings ["Elements_plotted" ][3 ], fontsize = 18 )
111- plt .xlabel ('Si/Al' , fontsize = 18 )
153+ plt .xlabel (Run_settings [ "Elements_plotted" ][ 10 ] , fontsize = 18 )
112154
113155plt .subplot (1 ,n , 3 )
114- y_av = corepy .movingaverage (coredata [Run_settings ["Elements_plotted" ][6 ]] / coredata [ Run_settings [ "Elements_plotted" ][ 2 ]], Run_settings ["moving_avg" ])
156+ y_av = corepy .movingaverage (coredata [Run_settings ["Elements_plotted" ][7 ]], Run_settings ["moving_avg" ])
115157axs = plt .plot (y_av ,coredata [Run_settings ["Depth_model" ]], color = 'blue' )
116158#plt.xlim([0,0.02])
117- plt .ylim (( max ( coredata [ Run_settings [ "Depth_model" ]]), min ( coredata [ Run_settings [ "Depth_model" ]])) )
118- plt .yticks ([])
159+ plt .ylim (Depth_figure_bottom , Depth_figure_top )
160+ # plt.yticks([])
119161plt .xticks (fontsize = 14 )
120162#plt.xscale('log')
121163plt .xlabel (Run_settings ["Elements_plotted" ][2 ], fontsize = 18 )
122- plt .xlabel ('Mo/Al' , fontsize = 18 )
164+ plt .xlabel (Run_settings [ "Elements_plotted" ][ 7 ] , fontsize = 18 )
123165
124166
125167plt .subplot (1 , n , 4 )
126- y_av = corepy .movingaverage (coredata [Run_settings ["Elements_plotted" ][8 ]] / coredata [ Run_settings [ "Elements_plotted" ][ 2 ]], Run_settings ["moving_avg" ])
168+ y_av = corepy .movingaverage (coredata [Run_settings ["Elements_plotted" ][4 ]], Run_settings ["moving_avg" ])
127169axs = plt .plot (y_av ,coredata [Run_settings ["Depth_model" ]], color = 'blue' )
128- plt .ylim (( max ( coredata [ Run_settings [ "Depth_model" ]]), min ( coredata [ Run_settings [ "Depth_model" ]])) )
170+ plt .ylim (Depth_figure_bottom , Depth_figure_top )
129171#plt.xlim([0,10])
130- plt .yticks ([])
172+ # plt.yticks([])
131173plt .xticks (fontsize = 14 )
132174#plt.xscale('log')
133175plt .xlabel (Run_settings ["Elements_plotted" ][1 ], fontsize = 18 )
134- plt .xlabel ('Ni/Al' , fontsize = 18 )
176+ plt .xlabel (Run_settings [ "Elements_plotted" ][ 4 ] , fontsize = 18 )
135177
136178plt .subplot (1 ,n ,5 )
137179y_av = corepy .movingaverage (Attribute_corelog [(os .path .join (attribute_plotted [0 ] + '_median' ))], Run_settings ["moving_avg" ])
138180axs = sns .scatterplot (x = attribute_plotted [0 ] , y = Run_settings ["Depth_model" ], hue = Run_settings ["RockClassification" ],s = 150 , edgecolor = 'black' ,data = attributedata ,palette = chemofacies_color )
139181axs .legend ([])
140- axs = plt .plot (y_av ,Attribute_corelog [Run_settings ["Depth_model" ]], color = 'blue' ,linewidth = 1.0 )
182+ # axs=plt.plot(y_av,Attribute_corelog[Run_settings["Depth_model"]], color='blue',linewidth=1.0)
141183
142184#plt.xlim([0,30])
143- plt .ylim (( max ( Attribute_corelog [ Run_settings [ "Depth_model" ]]), min ( Attribute_corelog [ Run_settings [ "Depth_model" ]])) )
144- plt .yticks ([])
185+ plt .ylim (Depth_figure_bottom , Depth_figure_top )
186+ # plt.yticks([])
145187plt .xticks (fontsize = 14 )
146188plt .xlabel (attribute_plotted [0 ], fontsize = 18 )
147- plt .ylabel ('' )
189+ # plt.ylabel('')
148190
149191
150192plt .subplot (1 ,n ,6 )
151193y_av = corepy .movingaverage (Attribute_corelog [(os .path .join (attribute_plotted [1 ] + '_median' ))], Run_settings ["moving_avg" ])
152194axs = sns .scatterplot (x = attribute_plotted [1 ] , y = Run_settings ["Depth_model" ], edgecolor = 'black' ,hue = Run_settings ["RockClassification" ], s = 150 ,data = attributedata ,palette = chemofacies_color )
153195axs .legend ([])
154- axs = plt .plot (y_av ,Attribute_corelog [Run_settings ["Depth_model" ]], color = 'blue' ,linewidth = 1.0 )
196+ # axs=plt.plot(y_av,Attribute_corelog[Run_settings["Depth_model"]], color='blue',linewidth=1.0)
155197
156198
157- plt .xlim ([0 ,30 ])
158- plt .ylim (( max ( Attribute_corelog [ Run_settings [ "Depth_model" ]]), min ( Attribute_corelog [ Run_settings [ "Depth_model" ]])) )
159- plt .yticks ([])
199+ # plt.xlim([0,40 ])
200+ plt .ylim (Depth_figure_bottom , Depth_figure_top )
201+ # plt.yticks([])
160202plt .xticks (fontsize = 14 )
161203plt .xlabel (attribute_plotted [1 ], fontsize = 18 )
162- plt .ylabel ('' )
204+ # plt.ylabel('')
163205
164206
165- plt .subplot (1 ,n ,7 )
207+ plt .subplot (1 ,n ,8 )
166208y_av = corepy .movingaverage (Attribute_corelog [(os .path .join (attribute_plotted [2 ] + '_median' ))], Run_settings ["moving_avg" ])
167209
168- axs = plt .plot (y_av ,Attribute_corelog [Run_settings ["Depth_model" ]], color = 'blue' ,linewidth = 1.0 )
210+ # axs=plt.plot(y_av,Attribute_corelog[Run_settings["Depth_model"]], color='blue',linewidth=1.0)
169211axs = sns .scatterplot (x = attribute_plotted [2 ] , y = Run_settings ["Depth_model" ],edgecolor = 'black' , hue = Run_settings ["RockClassification" ],s = 150 , data = attributedata ,palette = chemofacies_color )
170212axs .legend ([])
171213
172214#plt.xlim([50,100])
173- plt .ylim (( max ( Attribute_corelog [ Run_settings [ "Depth_model" ]]), min ( Attribute_corelog [ Run_settings [ "Depth_model" ]])) )
174- plt .yticks ([])
215+ plt .ylim (Depth_figure_bottom , Depth_figure_top )
216+ # plt.yticks([])
175217plt .xticks (fontsize = 14 )
176218plt .xlabel (attribute_plotted [2 ], fontsize = 18 )
177- plt .ylabel ('' )
219+ # plt.ylabel('')
178220
179221
180- plt .subplot (1 ,n ,8 )
222+ plt .subplot (1 ,n ,7 )
181223y_av = corepy .movingaverage (Attribute_corelog [(os .path .join (attribute_plotted [3 ] + '_median' ))], Run_settings ["moving_avg" ])
182224
183225axs = sns .scatterplot (x = attribute_plotted [3 ] , y = Run_settings ["Depth_model" ],edgecolor = 'black' , hue = Run_settings ["RockClassification" ],s = 150 , data = attributedata ,palette = chemofacies_color )
184226axs .legend ([])
185- axs = plt .plot (y_av ,Attribute_corelog [Run_settings ["Depth_model" ]], color = 'blue' ,linewidth = 1.0 )
227+ # axs=plt.plot(y_av,Attribute_corelog[Run_settings["Depth_model"]], color='blue',linewidth=1.0)
186228
187229#plt.xlim([0,3])
188- plt .ylim (( max ( Attribute_corelog [ Run_settings [ "Depth_model" ]]), min ( Attribute_corelog [ Run_settings [ "Depth_model" ]])) )
189- plt .yticks ([])
230+ plt .ylim (Depth_figure_bottom , Depth_figure_top )
231+ # plt.yticks([])
190232plt .xticks (fontsize = 14 )
191233plt .xlabel (attribute_plotted [3 ], fontsize = 18 )
192- plt .ylabel ('' )
234+ # plt.ylabel('')
193235
194236plt .subplot (1 ,n ,9 )
195237y_av = corepy .movingaverage (Attribute_corelog [(os .path .join (attribute_plotted [4 ] + '_median' ))], Run_settings ["moving_avg" ])
196238
197239axs = sns .scatterplot (x = attribute_plotted [4 ] , y = Run_settings ["Depth_model" ],edgecolor = 'black' , hue = Run_settings ["RockClassification" ],s = 150 , data = attributedata ,palette = chemofacies_color )
198240axs .legend ([])
199- axs = plt .plot (y_av ,Attribute_corelog [Run_settings ["Depth_model" ]], color = 'blue' ,linewidth = 1.0 )
241+ # axs=plt.plot(y_av,Attribute_corelog[Run_settings["Depth_model"]], color='blue',linewidth=1.0)
200242
201243#plt.xlim([0,3])
202- plt .ylim (( max ( Attribute_corelog [ Run_settings [ "Depth_model" ]]), min ( Attribute_corelog [ Run_settings [ "Depth_model" ]])) )
203- plt .yticks ([])
244+ plt .ylim (Depth_figure_bottom , Depth_figure_top )
245+ # plt.yticks([])
204246plt .xticks (fontsize = 14 )
205247plt .xlabel (attribute_plotted [4 ], fontsize = 18 )
206- plt .ylabel ('' )
248+ # plt.ylabel('')
207249
208250plt .savefig (os .path .join (dirName + '/' + Run_settings ["Lease_Name" ] + '_' + Formation_names + '_Attributelog' + '.png' ),dpi = 300 )
209- plt .savefig (os .path .join (dirName + '/' + Run_settings ["Lease_Name" ] + '_' + Formation_names + '_Attributelog' + '.eps' ),format = 'eps' ,dpi = 600 )
251+ plt .savefig (os .path .join (dirName + '/' + Run_settings ["Lease_Name" ] + '_' + Formation_names + '_Attributelog' + '.eps' ),format = 'eps' ,dpi = 600 )
0 commit comments