Skip to content

Instantly share code, notes, and snippets.

@FisherKK
Created June 25, 2018 19:35
Show Gist options
  • Save FisherKK/a78a54d4fa9bdd56c9512f24b98df5f9 to your computer and use it in GitHub Desktop.
Save FisherKK/a78a54d4fa9bdd56c9512f24b98df5f9 to your computer and use it in GitHub Desktop.
matplotlib.rcParams.update({'font.size': 14})
plt.scatter(df_data["size"], df_data["price"],
edgecolor='black', linewidth='1', s=70, alpha=0.7, c="#3176f7")
plt.plot(np.arange(0, 120, 0.1), [predict([x], model_parameters) for x in np.arange(0, 120, 0.1)], c="red")
plt.text(55, 36, "y = 0", color="red", fontsize=12)
plt.xlabel("Size [m^2]")
plt.ylabel("Price [k zł]")
plt.ylim(-100, 1000)
plt.xlim(0, 120)
plt.yticks(np.arange(0, 1000, 100))
plt.xticks(np.arange(0, 120, 10))
plt.grid(color='blue', linestyle='--', linewidth=1, alpha=0.2)
plt.gca().spines["top"].set_visible(False)
plt.gca().spines["right"].set_visible(False)
plt.gca().spines["bottom"].set_visible(False)
plt.gca().spines["left"].set_visible(False);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment