参考: 官方教程: http://matplotlib.org/1.3.1/users/recipes.html http://stackoverflow.com/questions/13515471/matplotlib-how-to-prevent-x-axis-labels-from-overlapping-each-other # Tell matplotlib to interpret the x-axis values as dates ax.xaxis_date() # Make
众所周知,Python通常结合selenium模块来完成一些web的自动化测试以及RPA(Robotic Process Automation)工作.事实上,Selenium还可以支持插入js语句.执行js语句.返回js语句的执行结果到python程序中.这对于那些已经习惯了Javascript语法的程序员们,简直是一大神器. 举个简单的例子,我们用selenium原生的方法对页面的一个input元素执行输入时,通常需要用到selenium中的send_keys以及clear方法, 代码类似于: