import matplotlib.pyplot as plt
x = [1, 2, 3, 4, 5]
y = [2, 4, 6, 8, 10]
plt.plot(x, y)
plt.xlabel('X-axis')
plt.ylabel('Y-label')
plt.title('Example')
plt.show()


import pandas as pd
df = pd.DataFrame({
'A': [1, 2, 3, 4, 5],
'B': [5, 4, 3, 2, 1]
})

df.plot(x = 'A', y = 'B')
plt.show()

df.plot(x = 'A', y = 'B', color = 'green', linestyle = '--', marker = 'o')
plt.show()

LineAPI - matplotlib 공식 문서
MarkerAPI - matplotlib 공식 문서
Line styles - matplotlib 공식 문서
df.plot(x = 'A', y = 'B', color = 'red',
linestyle = '--', marker = 'o', label = 'Data Series')
plt.show()
ax = df.plot(x = 'A', y = 'B', color = 'red', linestyle = '--', marker = 'o')
ax.legend(['Data Series'])

ax = df.plot(x = 'A', y = 'B', color = 'red', linestyle = '--', marker = 'o')
ax.legend(['Data Series'])
ax.set_xlabel('X-axis')
ax.set_ylabel('Y-label')
ax.set_title('Title')
plt.show()

ax = df.plot(x = 'A', y = 'B', color = 'red', linestyle = '--', marker = 'o')
ax.legend(['Data Series'])
ax.set_xlabel('X-axis')
ax.set_ylabel('Y-label')
ax.set_title('Title')
ax.text(4, 3, 'Some Text', fontsize = 12)
ax.text(2, 2, 'Some Text', fontsize = 10)
plt.show()

plt.figure(figsize = (5, 3))
x = [1, 2, 3, 4, 5]
y = [2, 4, 6, 8, 10]
plt.plot(x, y)
plt.show()

fig, ax = plt.subplots(figsize = (10, 6))
ax = df.plot(x = 'A', y = 'B', color = 'red', linestyle = '--', marker = 'o', ax = ax)
ax.legend(['Data Series'])
ax.set_xlabel('X-axis')
ax.set_ylabel('Y-label')
ax.set_title('Title')
ax.text(4, 3, 'Some Text', fontsize = 12)
ax.text(2, 2, 'Some Text', fontsize = 10)
plt.show()
