You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

358 lines
309 KiB

{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAASoAAAEFCAYAAABUwKrMAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzsvXl8nFXZ//8+s2aWZNZM9j1p0qZtuu9l30VEQdaKAgo/\ncUFRQNAHfVBR/AnK4iOPqFWKQAFR4GHHsrS0pUvSNE2aNl2SNttkT2Yymf18/5gkpG26z6RJO+/X\na15Z5r7Pue65Zz5zznWuc11CSkmcOHHijGcUp9qAOHHixDkacaGKEyfOuCcuVHHixBn3xIUqTpw4\n4564UMWJE2fcExeqOHHijHviQhXnpBFCzBVCvCqEeEcIcakQ4l4hROuIh1sI8cCptjPOxEXE46ji\nnAxCCBOwEbgdkMCLQLGUsnvEMWuAb0kpK0+NlXEmOqpTbUCcCU8a8BMp5QcAQoj9QCbQPfj3eUB7\nXKTinAxxoYpzUkgpa4FaIYQSuBJQAzUjDvke8MipsC3O6UPcRxUnWtwJPAv8r5QyBCCEyATypJQf\nnVLL4kx44j6qOFFjUJg+Bc6WUu4SQtwDJEgpHzzFpsWZ4MRHVHFOCiFEoRBiOoCUspGIY7148Omr\ngH+fKtvinD7EhSrOyZIOrBRCmIUQacBcoEIIYSMy7dt6as2LczoQd6bHOSmklB8LIZ4BtgP9wPek\nlM1CiC8CG06tdXFOF+I+qjhx4ox74lO/OHHijHviQhUnTpxxT1yo4sSJM+6JC1WcOHHGPXGhihMn\nzrgnLlRx4sQZ98SFKk6cOOOeuFDFiRNn3BMXqjhx4ox74kIVJ06ccU9cqOLEiTPuiQtVnDhxxj1x\noYoTJ864Jy5UceLEGffEhSpOnDjjnnjivDjHjBBCS6Q8VjqQptFoMgwGg0WhUGhUKpVGCKFRKBQa\nInnOAuFwOBAOh/2hUMgXCAS8Lper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2/34/VasVms2G1Wg/5gE8UQqEQvb29dHZ20tHRgc/nw2q14nA4sNvtB4z8pJRs27aNl19+2fO3\nv/2t3+/3v9/a2vorKWWVEOJzwL3AQ1LKtw/uRwjxOJEwigGgh8joCSnljwefP5n7Ox1YBWwDZgJT\npZT7h+6vlPKh6L9yE5u4UI1gcOjdB7wjpbxgxP8PEKoR/78LmAZ8k8hq0B8Pev4a4NtEphjJREZZ\njUQWMV6SUv5hxLGfB6yDgvQwUDP4+4+JCOb/CiGesFgs2Xq9fuHtt99uuP322/UOh2O4PyklnZ2d\ntLa20tHRgV6vJyUlBYfDMWGF6WgMjRTb2tpob29Hp9ORmppKamoqWq12+LhwOMy7777LQw891LFp\n0ybh9Xp3Sikvl1J2DR0jhCgG6oCfE7mvVxKZyvcQ+cJ4DWgi4ofsPIn7ezcQklI+KoT4OdAgpfyz\nEOKnwCtSyqrYvWITk7hQjYIQ4n0ijtJXiYxqCoi8AQNEHKf/P3AfYCDiS1IAjwFdUsoHDtPmlUCm\nlPLJwzwvgJVE3vgq4B9E/CZ9SqVypcVi+YkQIvcvf/mL9rLLLhNKpRKIiFN3dzdNTU10dHRgsVhI\nS0vDbrczdMyZhNvtprW1lZaWFlQqFRkZGaSlpaFWqwF49tlneeaZZ5gyZYpr5cqVnlAo9EJ7e/uj\nREZPVURe9+nAMimlTwjxPaBHSvm3wUWUnwLPy4NCVY7z/j4H/FBKuWXQef8tIu+jH0opb4vByzLh\niQvVKAghPpVSzj/C81cDTwA7iCx1DxBxjE4CHh0c/l8B/ICIuEEk1EBL5AMBkWniK1LKJ0a0mwmc\nJaV8TgiRZrfb71KpVMuuvvpqvcPhSLrzzjtJSkoCIrFH+/fvp7m5mcTERDIzM0lOTo5pvNNEo7+/\nn6ampuHXKDs7G6fTyQM
"text/plain": [
"<matplotlib.figure.Figure at 0x290aa5ab588>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"#林贻鑫\n",
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"\n",
"plt.rcParams['font.family']= 'SimHei'\n",
"plt.rcParams['axes.unicode_minus']=False\n",
"dim_num=6\n",
"data=np.array([[0.50,0.32,0.35,0.30,0.30,0.88],\n",
"[0.45,0.35,0.30,0.40,0.40,0.30],\n",
"[0.43,0.99,0.30,0.28,0.22,0.30],\n",
"[0.30,0.25,0.48,0.95,0.45,0.40],\n",
"[0.20,0.38,0.87,0.45,0.32,0.28],\n",
"[0.34,0.31,0.38,0.40,0.92,0.28]])\n",
"angles=np.linspace(0, 2 * np.pi, dim_num, endpoint=False)\n",
"angles=np.concatenate((angles,[angles[0]]))\n",
"data=np.concatenate((data,[data[0]]))\n",
"radar_labels=['研究型(I)','艺术型(A)','社会型(S)','企业型(E)','传统型©','现实型®']\n",
"radar_labels=np.concatenate((radar_labels, [radar_labels[0]]))\n",
"plt.polar(angles, data)\n",
"plt.thetagrids(angles * 180/np.pi, labels=radar_labels)\n",
"plt.fill(angles, data, alpha=0.25)\n",
"plt.title('37')\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAfwAAAETCAYAAADTQLREAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzsnXd4FNXXx783CaH3DoKooBTpUQHpVTqhBkIHwYaC8goq\nPwtYUBAVsADSWwBpSu9NUAkgVQSN9BZqIJAQkvP+cTJsCCm7yczc2Zv7eZ59dtid2Tkbdubce+45\n3yOICBqNRqPRaNTGR7YBGo1Go9ForEc7fI1Go9FoMgDa4Ws0Go1GkwHQDl+j0Wg0mgyAdvgajUaj\n0WQAtMPXaDQajSYDoB2+RqNJFiHEcCHEDSHEdSHEW27sHyyEmJ7otfeFEGeEEGeFEAOss1aj0aSE\ndvgajSZJhBA1AXQFUBVALQAfCCFKpLB/KwDfAhAJXnsaQD0AjwKoAWCUEKKwlXZrNJqk0Q5fo9Ek\nRyS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iyhenP97zdZ1Sg+FCrHgz4kTwLhxHh48bhzw33+spCczlJ+YLl14qe7qVeDtt2Vbo7GIfPnk\n3i61w7eBggU5crhpE/cAdwsi14X/4YfA889bZV7aeOYZV2Zx7958o9IoQ3g40KuXxQJS6eD557kC\nZuZM4N49Nw86c8YVwv/mG3urXFJDCOC777g8cPp0jupplCMw0BXMkYF2+DYxcCAn4P7f/7l5g1qy\nhDN4ixVzbjb88OEsPHD2LNfna5SAiP875893dnR5/Hjgzz898NvDhgG3b/NagJ0leO7y5JNsI8D/\nATExcu3RmEZYGEd6b9+
"text/plain": [
"<matplotlib.figure.Figure at 0x290ec66b9e8>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"#刘征东\n",
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"x=np.linspace(0,12,50)\n",
"y=np.sin(x)\n",
"z=np.cos(x)\n",
"plt.figure(figsize=(8,4))\n",
"plt.ploty(x,y,label=\"$sin(x)$\",color=\"red\",linewidth=2)\n",
"plt.plot(x,z,\"b--\",label=\"$cos(x^2)$\")\n",
"plt.xlabel(\"Time(s)\")\n",
"plt.ylabel(\"Volt1\")\n",
"plt.title(\"2-18\")\n",
"plt.ylim(-1.2,1,2)\n",
"plt.legend()\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAASsAAAEFCAYAAAC7AsHyAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzsnXdcXfX9/5+fO9jzwuVyGYEEwkoCIWQREuKKK7Vqa93b\nauto1RjXr7ZaV6N26LdVq4211lFTW01trXGlMRsIATIICRD23hvu+vz+uAMIkMCFGBLv8/G4j+Se\ne+45n3O593Xen/fnPYSUEhcuXLiY7ihO9QBcuHDhYjy4xMqFCxenBS6xcuHCxWmBS6xcuHBxWuAS\nKxcuXJwWuMTKhQsXpwUusToNEUIE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HQN6vd6sUqmKe3p6trS1te3gmxWwHwE3Y22McRBIByKBP0opL7Q1pXC3WZIP2R4WIAOrcLUDDwJr\nbMd7zbbPtOX6pVGtUxmq8Oqrr2qeeuqp8BdffLHiyiuv7LRvv/3229s8PT3l+eefH/f1118fjouL\nm9JwBtdq4BgcW5hOCPEOsF7aGmzahEEFJGNtqX451jrjJiHE/2Etw7tGShl7EscYKoQ4R6/Xnyel\nXKpSqYISExNZuXKl35IlSzwWLFhAYGDgyTq901gsFkpLS8nNzWXbtm0dO3bsGGhoaBgqYFuwNjk9\nKbE7QojtWLvxvIW1CqoSayegg8BsrEL2ONbWZl1YS0Z7Yq1aWojVUr3OdriNUsr5J2OcYzF0NfBU\nMDAwIHp6eoRGoxl1utfZ2anw8/Nzeio41mqgS6yGIIS4D/gh1qndrVjrjHth7agyE+t0rwtrjfC/\nATdg/RIHYm128AesjUV
"text/plain": [
"<matplotlib.figure.Figure at 0x290ec686128>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"#唐圪菁\n",
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"plt.rcParams['font.sans-serif']='SimHei' #设置显示中文字体\n",
"plt.rcParams['axes.unicode_minus']=False #设置正常显示符号\n",
"major=np.array(['网工','建智','计科','软工','自动化','通信'])\n",
"number=np.array([[100,66,78],\n",
" [60,50,40],\n",
" [120,98,102],\n",
" [150,140,160],\n",
" [102,125,120],\n",
" [70,65,84]])\n",
"data_length=len(number) #数据长度\n",
"#把圆周等分为data_length份\n",
"angles=np.linspace(0,2*np.pi,data_length,endpoint=False)\n",
"number = np.concatenate((number,[number[0]]))\n",
"angles = np.concatenate((angles,[angles[0]]))\n",
"#绘制雷达图\n",
"plt.polar(angles,number,'o-',linewidth=3)\n",
"#设置角度和网格标签\n",
"plt.thetagrids(angles*180/np.pi,major,fontproperties='simhei',fontsize=12) #将各major标签放到顶点上,并设置标签字体、大小\n",
"plt.title('班级人数分布') #设置雷达图标题\n",
"plt.legend(['大一','大二','大三'],loc=(0.95,0.8),labelspacing=1) #图列标题,图列位置,图列大小\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAWQAAADuCAYAAAAOR30qAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzsnXdgFGX6xz8zW9J7740EQkuAQAKEpmBFbFixoSJ2sdzp\nqWf5eXh6tvPsXbErcoCKoggIhBogCZDee6+72c22+f0ROJEksFk2JIH5/KPAvu+8szvznWee9ymC\nJEnIyMjIyAw+4mAvQEZGRkamG1mQZWRkZIYIsiDLyMjIDBFkQZaRkZEZIsiCLCMjIzNEkAVZRkZG\nZoggC7KMjIzMEEEWZBkZGZkhgizIMjIyMkMEZX8+7KtSSeGOjgO1liFBfqcGowRjfVwRhMFejYyM\nzOnA3gZNoyRJfif6XL8EOdzRkbSkJNtXNQzY1NLChZmZXBrjy+NJkYO9HBkZmdMA4Y3NZdZ8TnZZ\nHMMcLy8u8Vbx/J5S6joNg70cGRmZMwhZkHvh6RET6JLgkR3Fg70UGRmZMwhZkHsh1tmZu0PD+CS3\nlv0NHYO9HBkZmTMEWZD74C/h4fgoBe75OQOLXKJURkbmFCALch94qlQ8HR1LWruZbwsbBns5MjIy\nZwCyIB+HG4KCGO8s8vDvOehM5sFejoyMzGmOLMjHQSEI/Ct2HGVdEs/vKx/s5cjIyJzmyIJ8AmZ6\neXGFj4oX9pZRqdEP9nJkZGROY2RBtoL/GzERZ1EgffeBwV6KjIzMaUy/MvXOVCKcnMibmoqHRRZk\nGRmZgUO2kK3ESaEAwJyRMcgrkZGROV2RBbkfGFSJg70EGRmZ0xhZkG1AtpJlZGQGAlmQ+4lsJcvI\nyAwUsiDbgEGVKFvJMjIydkcW5JPgiCgbzZY//VdGRkbGFuSwNxsxqBJRGPaztriB3XUd1OsMOCpE\n3pgVN9hLk5GRGabIFrKNlOv1PF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",
"\n",
"import matplotlib.pyplot as plt\n",
"\n",
"def calcu_elevation(x1, y1): # 计算高程\n",
"\n",
" ele = (1-x1/2+x1**5+y1**3)*np.exp(-x1**2-y1**2)\n",
"\n",
" return ele\n",
"\n",
"n = 256\n",
"\n",
"x = np.linspace(-3, 3, n)\n",
"\n",
"y = np.linspace(-3, 3, n)\n",
"\n",
"X, Y = np.meshgrid(x, y) # 将原始数据变为网格数据\n",
"\n",
"# 填充等高线的颜色, 8是等高线分为几部分\n",
"\n",
"plt.contourf(X, Y, calcu_elevation(X, Y), 8, alpha=0.75, cmap=plt.cm.hot) # 8表示要分几部分等高线\n",
"\n",
"# 画等高线\n",
"\n",
"C = plt.contour(X, Y, calcu_elevation(X, Y), 8, colors='black', linewidth=0.5)\n",
"\n",
"plt.clabel(C, inline=True, fontsize=10) # 添加文字标签 inlins表示等高线是穿过数字还是不穿过\n",
"\n",
"plt.xticks([])\n",
"\n",
"plt.yticks([])\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAPgAAAEmCAYAAABPkl3gAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzsvXd4XNd55/85996pmIrBDApRCZJgEcUmUiRFynKRZCuy\nrJVVLEeOldiPd9eO17HsrBQ9a69/cVySOHl+jktsJ/bGm9j+Seu4biy5ihYlqhdSYifBjjbAzGD6\nzC3n98cAFEjOAIMBWETN53nwgLxzy7mD+73nPe953/cIKSV16tS5PFEudgPq1Klz/qgLvE6dy5i6\nwOvUuYypC7xOncuYusDr1LmMqQu8Tp3LmLrAL1GEEJ8RQqSFECNCiFNCiE/M8vijQojueW6PFEKE\nRYm0EOJf5uv8dc4PdYFf2nxVShkBrgHuF0KsutgNApYDXUDDxW5InZmpC/x1gJTyKPA00HeRm3IY\nWDHxc/git6VOFdQF/jpACNEJXAXsn/j//zNhth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uesz1UsFvn617+e/+u//uvxXC73N+Pj41+VUhbPQ7Nfd9QFPguEEM5AKPRJ1W7/\n5NV33ulZeeONqjoLcxlAlZJGw6DJNDGBMU0jrqpYZXqwVKFA3jD471u3zlrkjzy6i22P76U54p9x\n34sh8EkMwySVzHDbf1pBJhNHURQ6OztpbW1FneX0YTqd5otf/GLmn//5nxOpVOrBbDb7b2/0SLm6\nwKtACKG6vd4POBsaPr/6ppv86269VbPNpqeREo9lETEMXFIypqqMahpGFWZpqlBAtyz+4tpr6QwE\nqrrc8eNjfO0ff0tTk2f
"text/plain": [
"<matplotlib.figure.Figure at 0x1fd2ddbaf28>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"#王诗婷\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"\n",
"# 解决 plt 中文显示的问题\n",
"plt.rcParams['font.sans-serif'] = ['SimHei']\n",
"plt.rcParams['axes.unicode_minus'] = False\n",
"\n",
"# 极轴图 - 极坐标的柱状图\n",
"\n",
"plt.figure(figsize=(8,4))#创建宽为8英寸、高为4英寸的画布\n",
"\n",
"ax1= plt.subplot(111, projection='polar')\n",
"#数字分别表示子图分布在第一行第一列、第一个索引位置,类型选为极点图\n",
"ax1.set_title('Radar Map\\n') # 创建标题\n",
"ax1.set_rlim(0,13)#值域范围\n",
"\n",
"data = np.random.randint(1,140,5)\n",
"\n",
"theta=np.arange(0,2*np.pi,2*np.pi/5)#第一个参数为起点,第二个参数为终点,第三个参数为步长\n",
"# 创建数据\n",
"\n",
"bar = ax1.bar(theta,data,alpha=0.2)#极坐标的柱状图,alpha表示不透明度\n",
"for r,bar in zip(data, bar):\n",
" bar.set_facecolor(plt.cm.jet(r/10.))#通过plt.cm接口实现\n",
" # 设置颜色jet的地方可以写其他的colormap\n",
"plt.thetagrids(np.arange(0.0, 360.0, 90), [])#在极坐标设置网格线的theta位置\n",
"# 设置网格、标签(这里是空标签,则不显示内容)\n",
"\n",
"plt.show\n",
"\n",
"# 输入产量与温度数据\n",
"production = [1125, 1725, 2250, 2875, 2900, 3750, 4125]\n",
"tem = [6, 8, 10, 13, 14, 16, 21]\n",
"rain = [25, 40, 58, 68, 110, 98, 120]\n",
"\n",
"colors = np.random.rand(len(tem)) # 颜色数组\n",
"size = production\n",
"plt.scatter(tem, rain, s=size, c=colors, alpha=0.6) # 画散点图, alpha=0.6 表示不透明度为 0.6\n",
"plt.ylim([0, 150]) # 纵坐标轴范围\n",
"plt.xlim([0, 30]) # 横坐标轴范围\n",
"plt.xlabel('温度') # 横坐标轴标题\n",
"plt.ylabel('降雨量') # 纵坐标轴标题\n",
"plt.show()\n"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAQQAAADuCAYAAADfoHlaAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzsnXd4XNWZ/7/n3ju9S5oZdcm2bMu9yLiBTTChEyBgHIrJ\nUpaEBEgB9gfkSd1N2WTTs6QQsoEly6YAC0kIoYQYXLCxsSWMXGRZvUzX9HbL+f0xkrD6lHsl2dHn\neebx49Gdc480937ve97zFkIpxRxzzDEHADAzPYE55phj9jAnCHPMMccwc4IwxxxzDDMnCHPMMccw\nc4IwxxxzDDMnCHPMMccwc4IwxxxzDDMnCHPMMccw3ExPYA5lIYSoAJQCKANQznFcuclkKmFZVs0w\nzPALAEcpTUuSxEuSlJIkied5PhkOh/sB9AEY+tdPKZVm7jeaQ0nIXKTiWAghNgBPALgcQAuAT1FK\n98/srMaHEGICsEatVq8sKipapFKpaimlFTzPl6hUKrVWq2XLysqkqqoqbt68eZrq6mqD1WolHMfh\nzBfDMBBFEYIgQBAE8DwPnufh9XqFjo6OeGdnZ6qrq4v6fD6STqcFSZISHMe5CSHdiUSize/3n6SU\nHgFwjFLKz/TfZTwIIbcD+PXgf3kAxwB8hlL61oxNapYxZyGMz5MAHAAaAGwB8EdCyDxKa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slJoVeduXUVRFOF2u9Hd3Y1kMomKigpUVVXl5Zg8evQorFYrqqqqCp6XJEn40pe+FH3iiSeO\nejyeKymlwYIHPUv4hxI
"text/plain": [
"<matplotlib.figure.Figure at 0x1fd70a77ef0>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"#杨海坤\n",
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"from matplotlib.font_manager import FontProperties\n",
"# 数据准备\n",
"labels=np.array([u\"A\",\"B\",u\"C\",u\"D\",u\"E\",u\"F\"])\n",
"stats=[83, 61, 95, 67, 76, 88]\n",
"# 画图数据准备,角度、状态值\n",
"angles=np.linspace(0, 2*np.pi, len(labels), endpoint=False)\n",
"stats=np.concatenate((stats,[stats[0]]))\n",
"angles=np.concatenate((angles,[angles[0]]))\n",
"# 用Matplotlib画蜘蛛图\n",
"fig = plt.figure()\n",
"ax = fig.add_subplot(111, polar=True)\n",
"ax.plot(angles, stats, 'o-', linewidth=2)\n",
"ax.fill(angles, stats, alpha=0.25)\n",
"# 设置中文字体\n",
"font = FontProperties(fname=r\"C:\\Windows\\Fonts\\simhei.ttf\", size=14)\n",
"ax.set_thetagrids(angles * 180/np.pi, labels, FontProperties=font)\n",
"#ax.set_thetagrids(angles * 180/np.pi, labels)\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"C:\\Users\\ymwy\\Anaconda3\\lib\\site-packages\\matplotlib\\font_manager.py:1297: UserWarning: findfont: Font family ['Microsoft YaHei'] not found. Falling back to DejaVu Sans\n",
" (prop.get_family(), self.defaultFamily[fontext]))\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXkAAAEICAYAAAC6fYRZAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAD1tJREFUeJzt3X+MZXV5x/H3MyzKlprlx06XWogLImAwXVYn1/bWVKhQ\nNaZmG2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Z0mJgz6Vaqtds3TwJPA4cDZmbkD2AVs2tPBETEeEVMRMTUzM9NSCZJeMH9N1tnZ\n5rVWpVZCPjO/lpmXAg8DZy7i+InMHMvMsdHR0TZKkDRfp9OsxeqarKteW+2aM4HXAycCn4mI7TTt\nmhvaGF/SAXJNVvW1EvKZeSdwZxtjSWqJa7IKb6GUpNIMeUkqzJCXpMIMeUkqzJCXpMIMeUkqzJCX\npMIMeUkqzJCXpMIMeUkqzJCXpMIMeUkqzJCXpMIMeUkqzDVepUPB9VY1IF7JS8ttbr3ViYlmOzk5\n6Iq0ihjy0nJzvVUNkCEvLTfXW9UA2ZOXlpvrrWqADHnpUHC9VQ2I7RpJKsyQl6TCDHlJKsyQl6TC\nDHlJKsyQl6TCDHlJKsyQl6TCDHlJKsyQl6TCDHlJKsyQl6TCDHlJKsyQl6TCWnvUcES8DdgK/D6w\nGVgHbMvMbOsc0rJw/VUV1sqVfERsBo4A/gU4JzN3ALuATW2MLy0b119VcW21a94KnEBzBX/G/g6O\niPGImIqIqZmZmZZKkJbA9VdVXCshn5mfzMxrgG8Bn46I7cDpwH17OX4iM8cyc2x0dLSNEqSlcf1V\nFdfq8n+ZeWH/y79uc1xp2bj+qopzjVfJ9VdVmLdQSlJhhrwkFWa7RgfHe8ylFc0reS2d95hLK54h\nr6XzHnNpxTPktXTeYy6
"text/plain": [
"<matplotlib.figure.Figure at 0x1c4397a5a58>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"\n",
"def scatterplot(x_data, y_data, x_label=\"\", y_label=\"\", title=\"\", color = \"r\", yscale_log=False):\n",
" plt.rcParams['font.sans-serif'] = ['SimHei']\n",
" plt.rcParams['axes.unicode_minus'] = False\n",
" # Plot the data, set the size (s), color and transparency (alpha)\n",
" # of the points\n",
" plt.scatter(x_data, y_data, s = 10, color = color, alpha = 0.75)#散点图的制作\n",
"\n",
" if yscale_log == True:\n",
" plt.set_yscale('log')\n",
"\n",
" # Label the axes and provide a title\n",
" plt.title(title)\n",
" plt.xlabel(x_label)\n",
" plt.ylabel(y_label)\n",
"\n",
"height=[140,161,170,182,175,173,165,155,150,120]\n",
"weight=[38,50,58,80,70,69,55,45,40,30]\n",
"scatterplot(height,weight,\"身高\",\"体重\",\"Height-to-weight scale chart\")\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.1"
}
},
"nbformat": 4,
"nbformat_minor": 2
}