Skip to content

Instantly share code, notes, and snippets.

@GeorgeSeif
Created March 1, 2018 16:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save GeorgeSeif/bbea045890a2b043000946ac84efa829 to your computer and use it in GitHub Desktop.
Save GeorgeSeif/bbea045890a2b043000946ac84efa829 to your computer and use it in GitHub Desktop.
def lineplot(x_data, y_data, x_label="", y_label="", title=""):
# Create the plot object
_, ax = plt.subplots()
# Plot the best fit line, set the linewidth (lw), color and
# transparency (alpha) of the line
ax.plot(x_data, y_data, lw = 2, color = '#539caf', alpha = 1)
# Label the axes and provide a title
ax.set_title(title)
ax.set_xlabel(x_label)
ax.set_ylabel(y_label)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment