摘要: 关于web图表制作的方法有很多种,大家可以去网上这里我就介绍我经常使用的一种方法CanvasJS,这也是一款非常容易掌握并且好用的一种方法。 首先可以去网上下载canvasjs.js插件。下载路径:http://canvasjs.com/assets/script/canvasjs.min.js 1 阅读全文
posted @ 2017-09-23 17:49 岑夫子 阅读(491) 评论(0) 推荐(1) 编辑
摘要: 一: 安装: sudo apt-get install mysql-serversudo apt-get install mysql-clientsudo apt-get install libmysqlclient-dev 二 :连接: mysql -h 127.0.0.1 -P 3306 -u 阅读全文
posted @ 2020-11-08 13:24 岑夫子 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 一:uWSGI的安装 sudo pip install uwsgi 如果安装报错: conda install -c conda-forge uwsgi conda install -c conda-forge libiconv 测试 test.py: uwsgi --http :8020 --ch 阅读全文
posted @ 2020-11-05 21:34 岑夫子 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 1 绘制直方图: import matplotlib.pyplot as plt import numpy as np import matplotlib def hist1(): # 设置matplotlib正常显示中文和负号 matplotlib.rcParams['font.sans-seri 阅读全文
posted @ 2020-03-18 22:28 岑夫子 阅读(1184) 评论(0) 推荐(0) 编辑
摘要: import numpy as np from matplotlib import pyplot as plt from matplotlib import animation fig, ax = plt.subplots() x = np.arange(0, 2*np.pi, 0.01) prin 阅读全文
posted @ 2020-01-12 21:47 岑夫子 阅读(919) 评论(0) 推荐(0) 编辑
摘要: 一: fig.add_axes 画图中图 fig = plt.figure() x = np.arange(1, 9, 1) y = np.linspace(1, 10, 8) left, bottom, width, height = 0.1, 0.1, 0.8, 0.8 ax1 = fig.ad 阅读全文
posted @ 2020-01-12 21:18 岑夫子 阅读(1588) 评论(0) 推荐(0) 编辑
摘要: 1:第一种方法 # method1: subplot2grid ################# ''' 第一个参数(3, 3) 是把图分成3行3列 第二个参数是位置 (0, 0)表示从0行0列开始 第三个参数 colspan=3 表示列占3列 , 第四个参数 rowspan=1 表示行占一行 ' 阅读全文
posted @ 2020-01-12 17:45 岑夫子 阅读(810) 评论(0) 推荐(0) 编辑
摘要: import numpy as npimport matplotlib.pyplot as pltfrom mpl_toolkits.mplot3d import Axes3D fig = plt.figure() ax = Axes3D(fig) x = np.arange(-4, 4, 0.25 阅读全文
posted @ 2020-01-12 17:24 岑夫子 阅读(1367) 评论(0) 推荐(0) 编辑
摘要: numpy库提供非常便捷的数组运算,方便数据的处理。 1、数组与标量之间可直接进行运算 In [45]: aOut[45]:array([[ 0, 1, 2, 3], [ 4, 5, 6, 7], [ 8, 9, 10, 11]]) In [46]: a/5Out[46]:array([[ 0. , 阅读全文
posted @ 2020-01-12 15:03 岑夫子 阅读(3154) 评论(0) 推荐(0) 编辑
摘要: 一:散点图: scatter函数原型 其中散点的形状参数marker如下: 其中颜色参数c如下: n = 1024 # 均值是0, 方差是1, 取1024个数 x = np.random.normal(0, 1, n) y = np.random.normal(0, 1, n) # 设置颜色值 T 阅读全文
posted @ 2020-01-12 14:52 岑夫子 阅读(769) 评论(0) 推荐(0) 编辑
摘要: 一 figure使用 1 import numpy as np 2 import matplotlib.pyplot as plt 3 4 # 从-3到中取50个数 5 x = np.linspace(-3, 3, 50) 6 print(x) 7 y1 = 2*x+1 8 y2 = x**2 9 阅读全文
posted @ 2020-01-11 23:26 岑夫子 阅读(15359) 评论(0) 推荐(0) 编辑