Skip to content

Instantly share code, notes, and snippets.

@NimishMishra
Created April 22, 2019 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NimishMishra/89a73210b54c8786c0aafc7ea43de9bb to your computer and use it in GitHub Desktop.
Save NimishMishra/89a73210b54c8786c0aafc7ea43de9bb to your computer and use it in GitHub Desktop.
def plot(x_axis, y_axis_1, y_axis_2, label1, label2, directory, month):
figure = plt.figure()
ax = sns.lineplot(x=date, y=y_axis_1)
ax = sns.lineplot(x=x_axis, y=y_axis_2)
figure.legend(labels = [label1, label2])
plt.show()
path = (directory + month + '/') + month + label1 + label2 + '.png'
fig = ax.get_figure()
fig.savefig(path)
def create_averaged_data(observed_parameter):
observed_parameter = np.array(observed_parameter)
mean = np.mean(observed_parameter)
observed_parameter[observed_parameter <= 0] = mean
return np.mean(observed_parameter)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment