Created
November 20, 2020 04:29
-
-
Save rhoit/cb260a69d9f2100990b04dffe699aa68 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 matplotlib.pyplot as plt | |
def myplot(x, y, **kwargs): | |
plt.plot(x, y, **kwargs) | |
plt.xlabel('X') | |
plt.ylabel('Y') | |
plt.title('My plot') | |
plt.show() | |
x = [1, 3, 4, 5] | |
y = [3, 6, 9, 12] | |
myplot(x, y, color='orange', marker='s') | |
# you can use a dictionary as kwargs | |
d = {'color':'magenta', 'marker':'d'} | |
myplot(x, y, **d) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment