Matplotlib
lixintong1992
这个作者很懒,什么都没留下…
展开
-
在Matplotlib绘图中添加Latex风格公式
http://www.cnblogs.com/chaosimple/p/4031421.htmlMatplotlib绘图的过程中,可以为各个轴的Label,图像的Title、Legend等元素添加Latex风格的公式。只需要在Latex公式的文本前后各增加一个$符号,Matplotlib就可以自动进行解析,示例代码如下:#!/usr/bin/env python转载 2016-04-24 17:22:26 · 4993 阅读 · 3 评论 -
matplotlib最简单的带图例线图
不废话直接上代码import numpy as npimport matplotlib.pyplot as pltx = [1, 2, 3, 4, 5]y1 = [1, 4, 9, 2, 3]y2 = [5, 2, 7, 4, 3]plt.plot(x, y1, 'r-*', label='line1')plt.plot(x, y2, 'b-o', label='line2')plt.原创 2016-07-26 20:17:22 · 6756 阅读 · 0 评论