<jupyter_start><jupyter_text>Plotting Functions Thermofacies<jupyter_code>#basic plot to inspect data 
def make_layout_tc (log_df, XRD, TC):
    
    import numpy as np
    import pandas as pd
    import matplotlib
    import matplotlib.pyplot as plt
  
    fig, axs = plt.subplots(nrows=1, ncols=6, sharey=True, squeeze=True, figsize=(15, 15), gridspec_kw={'wspace': 0.25})
    fig.subplots_adjust(left=0.05, bottom=0.05, right=0.975, top=0.7, wspace=0.2, hspace=0.2)
    axs[0].set_ylabel('Depth (ft)')
    axs[0].invert_yaxis()
    axs[0].get_xaxis().set_visible(False)
    
    # first track GR/SP/CALI logs to display
    ax1 = axs[0].twiny()  
    ax1.plot(log_df.GR, log_df.index, '-', color='#2ea869', linewidth=0.5)
    ax1.set_xlim(0,450) 
    ax1.set_xlabel('GR (API)', color='#2ea869')
    ax1.minorticks_on()
    ax1.tick_params(axis='x', color='#2ea869')
    ax1.spines['top'].set_position(("axes", 1.15)) 
    
    ax2 = axs[0].twiny() 
    ax2.plot(log_df.SP, log_df.index, '-', color='#0a0a0a', linewidth=0.7)
    ax2.set_xlim(-200,200) 
    ax2.set_xlabel('SP(mV)', color='#0a0a0a')
    ax2.minorticks_on()
    ax2.tick_params(axis='x', color='#0a0a0a')
    ax2.spines['top'].set_position(("axes", 1.075))    
      
    ax3 = axs[0].twiny() 
    ax3.plot(log_df.DCAL, log_df.index, '--', color='#9da4a1', linewidth=0.5)
    ax3.set_xlim(-5,15) 
    ax3.set_xlabel('DCAL (in)', color='#9da4a1')
    ax3.minorticks_on()
    ax3.tick_params(axis='x', color='#9da4a1')
    ax3.spines['top'].set_position(("axes", 1.0))
    ax3.grid(True)
    
    # Second track RHOB/NPHI/PEF logs to display
    ax1 = axs[1].twiny()  
    ax1.plot(log_df.RHOZ, log_df.index, '-', color='#ea0606', linewidth=0.5)
    ax1.set_xlim(1.5,3.0) 
    ax1.set_xlabel('RHOB (g/cm3)', color='#ea0606')
    ax1.tick_params(axis='x', colors='#ea0606')
    ax1.minorticks_on()
    ax1.spines['top'].set_position(("axes", 1.15))

    ax2 = axs[1].twiny()  
    ax2.plot(log_df.NPHI, log_df.index, '-', color='#1577e0', linewidth=0.5)
    ax2.set_xlim(1,0) 
    ax2.set_xlabel('NPHI (v/v)', color='#1577e0')
    ax2.tick_params(axis='x', color='#1577e0')
    ax2.minorticks_on()
    ax2.spines['top'].set_position(("axes", 1.075))
    
    ax3 = axs[1].twiny()  
    ax3.plot(log_df.PEFZ, log_df.index, '-', color='#1acb20', linewidth=0.5)
    ax3.set_xlim(0,15) 
    ax3.set_xlabel('PEFZ (b/e)', color='#1acb20')
    ax3.tick_params(axis='x', color='#1acb20')
    ax3.minorticks_on()
    ax3.spines['top'].set_position(("axes", 1.0))
    ax3.grid(True)
    
    # Third track Resistivities
    ax1 = axs[2].twiny()  
    ax1.plot(log_df.AT10, log_df.index, '-', color='#d6dbd7', linewidth=0.5)
    ax1.set_xlim(0.2,20000)  
    ax1.set_xlabel('AT10 (ohm.m)', color='#d6dbd7')
    ax1.tick_params(axis='x', color='#d6dbd7')
    ax1.set_xscale('log')
    ax1.minorticks_on()
    ax1.spines['top'].set_position(("axes", 1.15))
    
    ax2 = axs[2].twiny()  
    ax2.plot(log_df.AT30, log_df.index, '-', color='#0a0a0a', linewidth=0.5)
    ax2.set_xlim(0.2,20000)  
    ax2.set_xlabel('AT30 (ohm.m)', color='#0a0a0a')
    ax2.tick_params(axis='x', color='#0a0a0a')
    ax2.set_xscale('log')
    ax2.minorticks_on()
    ax2.spines['top'].set_position(("axes", 1.075))
    
    ax3 = axs[2].twiny()  
    ax3.plot(log_df.AT90, log_df.index, '-', color='#ea0606', linewidth=0.5)
    ax3.set_xlim(0.2,20000)  
    ax3.set_xlabel('AT90 (ohm.m)', color='#ea0606')
    ax3.tick_params(axis='x', color='#ea0606')
    ax3.set_xscale('log')
    ax3.minorticks_on()
    ax3.spines['top'].set_position(("axes", 1.0))
    ax3.grid(True)

   # Forth track Sonic
    ax1 = axs[3].twiny()  
    ax1.plot(log_df.DTSM, log_df.index, '-', color='#9da4a1', linewidth=0.5)
    ax1.set_xlim(200,40) 
    ax1.set_xlabel('DTS (us/ft)', color='#9da4a1')
    ax1.tick_params(axis='x', color='#9da4a1')
    ax1.minorticks_on()
    ax1.spines['top'].set_position(("axes", 1.075))
    
    ax2 = axs[3].twiny()  
    ax2.plot(log_df.DTCO, log_df.index, '-', color='#0a0a0a', linewidth=0.5)
    ax2.set_xlim(200,40) 
    ax2.set_xlabel('DTC (us/ft)', color='#0a0a0a')
    ax2.tick_params(axis='x', colors='#0a0a0a')
    ax2.minorticks_on()
    ax2.spines['top'].set_position(("axes", 1.0))
    ax2.grid(True)


  # Fifth track eq10/TC to display
    ax1 = axs[4].twiny()  
    ax1.plot(XRD.Quartz, XRD.index, 'o', color='gold')
    ax1.set_xlim(0,100) 
    ax1.set_xlabel('Quartz wt%', color='gold')
    ax1.tick_params(axis='x', color='gold')
    ax1.minorticks_on()
    ax1.spines['top'].set_position(("axes", 1.075))

    ax2 = axs[4].twiny()  
    ax2.plot(XRD['K-feldspar'], XRD.index, 'o', color='blue')
    ax2.set_xlim(0,100) 
    ax2.set_xlabel('K-feldspar wt%', color='blue')
    ax2.tick_params(axis='x', colors='blue')
    ax2.minorticks_on()
    ax2.spines['top'].set_position(("axes", 1.0))
    ax2.grid(True)


    # Sixth track Temp/TC to display
    ax1 = axs[5].twiny()  
    ax1.plot(TC.Matrix_TC, TC.index, 'o', color='grey')
    ax1.set_xlim(0,5) 
    ax1.set_xlabel('TC Measured W/mC', color='grey')
    ax1.tick_params(axis='x', color='grey')
    ax1.minorticks_on()
    ax1.spines['top'].set_position(("axes", 1.075))

    ax2 = axs[5].twiny()  
    ax2.plot(log_df.GTEM, log_df.index, '-', color='orange')
    #ax2.set_xlim(0,5) 
    ax2.set_xlabel('Temp degF', color='orange')
    ax2.tick_params(axis='x', colors='orange')
    ax2.minorticks_on()
    ax2.spines['top'].set_position(("axes", 1.0))
    ax2.grid(True)
         
    fig.suptitle('Petrophysical log for 58-32',weight='bold', fontsize=20, y=0.925);
    plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.20557429433694302, 'fraction_numerical': 0.07544825137582105, 'mean_word_length': 3.5693430656934306, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '608446', 'license': 'MIT', 'n_tokens_mistral': 2732, 'n_tokens_neox': 2569, 'n_words': 314, 'path': '.ipynb_checkpoints/plotting_functions-checkpoint.ipynb', 'repo_name': 'emiliegentry/UtahForge_logdata', 'size': '5633'}