Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import seaborn as sns
- import numpy as np
- import pandas as pd
- x = np.arange(-3, 3, 0.01)
- a = 5
- b = 3
- rand = np.random.randn(len(x))
- y = a + b*x + rand
- xS = pd.Series(x)
- yS = pd.Series(y)
- #data = pd.concat( [ xS, yS ], axis = 1)
- data = pd.DataFrame()
- data['x'] = xS
- data['y'] = yS
- data.head()
- g = sns.lmplot(x = 'x', y = 'y', data = data)
- sns.plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement