读书笔记--python数据可视化--001_matplotlib学习

#-*- coding: UTF-8 -*-
'''
 #################################################  
 # Author : 余欢
 # Date : Jan 1, 2016    10:31:38 AM
 #company : 南京师范大学--大数据实验室
 # description : 
 ################################################# 
'''
import numpy as np
from matplotlib import pyplot as plt

x = np.arange(0, 6, 0.01)  #产生数据

plt.plot(x, np.log(x), label="log(x)")  #X,Y轴数字和标签
plt.plot(x, x*np.sin(x) + 1, label="sin(x)")
plt.plot(x, x**2, label="x**2")

plt.legend(loc="upper left", ncol=1)  #在左上角显示并用3行显示函数的说明
plt.grid(True)  #网格显示

plt.xlabel("data set")  #X轴数据
plt.ylabel("data statistic") #Y轴数据
plt.xlim(0, 6) #X轴数据范围
plt.title("This is a Sample")

plt.show()

这里写图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值