Created
April 26, 2019 18:40
-
-
Save kshitij10496/f3235ba5357753aa5f4ecff087f274b9 to your computer and use it in GitHub Desktop.
Jena's MTP Code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
def plot(x, y, deg, well): | |
''' | |
x, y are the inputs (porosity and permeability) respectively. | |
deg = degree of the ploynomial best-fit curve. | |
well = name of the well. | |
''' | |
z = np.polyfit(x, y, deg) | |
plt.rcParams.update({'font.size': 16}) | |
plt.plot(np.unique(x), np.poly1d(z)(np.unique(x)), label='Best Fit Curve') | |
plt.plot(x, y, '.r', label='Core Permeability Data') | |
plt.title(well + ': Permeability vs Porosity Relationship') | |
plt.xlabel('Porosity (Fraction)') | |
plt.ylabel('Permeability (mD)') | |
plt.legend() | |
plt.savefig(well + '.png') | |
plot(x, y, 3, "Well 1") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment