【发布时间】:2016-08-02 19:25:14
【问题描述】:
我正在尝试用seaborn 制作一个情节,这是我用patplotlib 完成的一个简单情节
import matplotlib.pyplot as plt
radius = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0]
area = [3.14159, 12.56636, 28.27431, 50.26544, 78.53975, 113.09724]
square = [1.0, 4.0, 9.0, 16.0, 25.0, 36.0]
plt.plot(radius, area, label='Circle')
plt.plot(radius, square, marker='o', linestyle='--', color='r', label='Square')
plt.xlabel('Radius/Side')
plt.ylabel('Area')
plt.title('Area of Shapes')
plt.legend()
plt.show()
有什么想法吗?
【问题讨论】:
-
包括IdentationError?
标签: python matplotlib seaborn