```
import numpy as np
import os
import pandas as pd
import matplotlib.pyplot as plt
print(matplotlib.get_backend())
n = 1024 # data size
df = pd.DataFrame({
"x": np.random.normal(0, 1, n),
"y": np.random.normal(0, 1, n),
})
color = np.arctan2(df["y"], df["x"])
df.plot.scatter(x="x", y="y", c=color, s=60, alpha=.5, cmap="rainbow")
plt.show()
```
```
import pandas as pd
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
# matplotlib.use('agg')
# df = pd.DataFrame({ 'sample1':['foo','bar','bar','qux'], 'score':[5,9,1,7]})
# sum_df = df.groupby("sample1").sum()
# pie = sum_df.plot(kind="pie", figsize=(6,6), legend = False, use_index=False, subplots=True, colormap="Pastel1")
# plt.savefig('pie')
df = pd.DataFrame(3 * np.random.rand(4), index=['go', 'java', 'c++', 'c'], columns=['L'])
df.plot.pie(subplots=True)
plt.show()
# plt.savefig('pie')
# df = pd.DataFrame(np.random.rand(5, 4), columns=['a', 'b', 'c', 'd'])
# df.plot.area()
# plt.savefig('area')
# df = pd.DataFrame(np.random.rand(10,5),columns=['a','b','c','d','e'])
# df.plot(kind="bar",stacked=True)
# #或者使用df.plot.bar(stacked="True")
# plt.savefig('bar')
# import numpy as np
# import os
# import pandas as pd
# import matplotlib.pyplot as plt
# n = 1024 # data size
# df = pd.DataFrame({
# "x": np.random.normal(0, 1, n),
# "y": np.random.normal(0, 1, n),
# })
# color = np.arctan2(df["y"], df["x"])
# df.plot.scatter(x="x", y="y", c=color, s=60, alpha=.5, cmap="rainbow")
# plt.show()
```