随笔分类 - python
摘要:matplotlib 添加注释的方式 matplotlib.pyplot.annotate Annotate the point xy with text s s : str The text of the annotation xy : iterable Length 2 sequence spe
阅读全文
摘要:histogram A histogram is an accurate representation of the distribution of numerical data. It is an estimate of the probability distribution of a cont
阅读全文
摘要:本文的目的是记录meshgrid()的理解过程: step1. 通过一个示例引入创建网格点矩阵; step2. 基于步骤1,说明meshgrid()的作用; step3. 详细解读meshgrid()的官网定义; 说明:step1和2 的数据都是基于笛卡尔坐标系的矩阵,目的是为了方便讨论。 step
阅读全文
摘要:numpy.ravel(a, order='C') Return a flattened array numpy.chararray.flatten(order='C') Return a copy of the array collapsed into one dimension numpy.sq
阅读全文
摘要:pilow的基本操作 基于pilow生成验证码
阅读全文
摘要:list comprehension Using a list comprehension: [x for x in iterable] to create list instance [expresion for x in iterabel ] 列表推导式的核心在expression. 列表推推导
阅读全文
摘要:class numpy.random.RandomState(seed=None) RandomState 是一个基于Mersenne Twister算法的伪随机数生成类 RandomState 包含很多生成 概率分布的伪随机数 的方法。 如果指定seed值,那么每次生成的随机数都是一样的。即对于某
阅读全文
摘要:The sqlite3 module supports two kinds of placeholders: question marks (qmark style) and named placeholders (named style). execute(sql[, parameters]) s
阅读全文
摘要:本片文章主要是对pickle官网的阅读记录。 The pickle module implements binary protocols for serializing and de-serializing a Python object structure. “Pickling” is the p
阅读全文
摘要:xlrd.open_workbook(filename=None, logfile=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>, verbosity=0, use_mmap=1, file_contents=None,
阅读全文
摘要:在《matplotlib极坐标系应用之雷达图》 中,我们提出了这个问题“图例中每种成员的颜色是怎样和极坐标相应的成员的颜色相对应的呢”,那么接下来我们说说legend的一般使用和设置。 调用legend()一般有三种方式: 方式1. 自动检测,直接调用legend(); 在plot()时就指定图例l
阅读全文
摘要:Q1:图例中每种成员的颜色是怎样和极坐标相应的成员的颜色相对应的呢?且听下回分解
阅读全文
摘要:matplotlib之极坐标系的极径网格线(rgrids)的显示刻度 matplotlib.pyplot.rgrids(*args, **kwargs) Get or set the radial gridlines on a polar plot. get or set 径向网格线 call si
阅读全文
摘要:极坐标系的极角网格线(thetagrids)的显示刻度 matplotlib.pyplot.thetagrids(*args, **kwargs) Get or set the theta locations of the gridlines in a polar plot. get or set
阅读全文
摘要:set_theta_zero_location(loc, offset=0.0) Sets the location of theta’s zero. (Calls set_theta_offset with the correct value in radians under the hood.)
阅读全文
摘要:ax1 是顺时针方向的图 ax2 是逆时针方向的图 set_theta_direction(direction) Set the direction in which theta increases. clockwise, -1: Theta increases in the clockwise d
阅读全文
摘要:从上图可以看出,默认极坐标系的 极角显示刻度为(0, 360,45),极径显示刻度为(0,1.0,0.2),0度的方向为“E”,默认极坐标的方向是逆时针方向。 那么, 1. 怎么设置极坐标系的方向? 2. 怎么设置极坐标(ρ, 0)的起始位置? 3. 怎样设置极坐标系 的极角网格线(thetagri
阅读全文
摘要:该实例主要是针对 requests 和 BeautifulSoup的应用。
阅读全文
摘要:linux 环境下怎样对不同的python环境进行 方便的切换呢?update-alternatives工具能够非常方便的帮我们完成这个任务。而windows环境下可通过anaconda来完成. 1.通过update-alternatives工具来管理python版本的切换 2.update-alt
阅读全文
摘要:dictionary是一个有元组组成的list,变量名有点歧义,这里是想表达 由元组组成的list哈。 之所以用dictionary是因为模拟的将字典转换成list。 将list进行排序,而根据lambda函数指定的元素进行排序。 例子中是 根据 每个元组的第0个元素,也即是字典的key进行排序;
阅读全文

浙公网安备 33010602011771号