Last active
November 30, 2019 15:53
-
-
Save tkshnkmr/bdcc7c0f7278fbdc7891e39272a9870b to your computer and use it in GitHub Desktop.
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 | |
# Input x, output y | |
x = np.linspace(0, 2*np.pi, 400) | |
y = np.sin(x**2) | |
# Plot | |
plt.plot(x, y) | |
# Change the fontsize of ticks | |
plt.xticks(fontsize=8) | |
plt.yticks(fontsize=8, rotation=90) | |
# Add label | |
plt.xlabel('X input', fontsize=14) | |
plt.ylabel('Y output', fontsize=14) | |
plt.title('Simple plot') | |
# Save plot | |
plt.savefig('Simple_plot.png') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment