# -*- coding: utf-8 -*-
"""
Created on Sat Jun 2 09:33:53 2018
@author: chase
"""
#import numpy
#x = numpy.array([1,8,5,4])
#y = numpy.array([[1,4,3],[4,5,10],[7,18,9]])
#print(x)
#print(y)
#print(x.sort())
#print(y.sort())
#print(x.max())
#print(y.max())
#print(y[0:2])
import pandas as pd
#p = pd.read_csv(r"C:\Users\chase\Desktop\hexun.csv")
#print(p.describe())
#print(p.head())
#k = pd.read_html("http://datacenter.mep.gov.cn/websjzx/dataproduct/resourceproduct/queryResourceList.vm?rcode=01")
#print(k)
#k = pd.read_table("C:/Users/chase/Desktop/abc.txt")
# index_col=0:设置第1列数据作为index
#print(k['id 文章 阅读数'])
import matplotlib.pyplot as plt
import numpy as np
x = [1,2,3,4,5]
y = [10,9,18,57,26]
#plt.plot(x,y,'--')#
#plt.scatter(x,y,c='r') # c设置颜色
#plt.plot(x,y,"*--r")
"""
-实线 --短线 -.短点相间线 :虚点线
线条的颜色
b---blue c---cyan g---green k----black
m---magenta r---red w---white y----yellow
控制标记风格
标记风格有多种:
. Point marker
, Pixel marker
o Circle marker
v Triangle down marker
^ Triangle up marker
< Triangle left marker
> Triangle right marker
1 Tripod down marker
2 Tripod up marker
3 Tripod left marker
4 Tripod right marker
s Square marker
p Pentagon marker
* Star marker
h Hexagon marker
H Rotated hexagon D Diamond marker
d Thin diamond marker
| Vertical line (vlinesymbol) marker
_ Horizontal line (hline symbol) marker
+ Plus marker
x Cross (x) marker
"""
import matplotlib as mpl
# 设置中文显示
#mpl.rcParams['font.sans-serif'] = ['SimHei']
#plt.scatter(x,y,c='r',marker="*")
#plt.xlabel("hello")
#plt.ylabel(u"你个傻子")
#plt.title("test",fontsize=24)
data = np.random.randint(1,30,100)
from scipy.stats import norm
import seaborn as sns
# 正态分布
mu = 0
# 正确显示负数
mpl.rcParams['axes.unicode_minus']=False
#sigma = 1
#x = np.arange(-5, 5, 0.1)
#y = norm.pdf(x, 0, 1)
#plt.plot(x, y)
#plt.xlabel('x')
#plt.ylabel('density')
#plt.show()
#plt.hist2d([1,2,6,12,16],[10,90,8,70,6],[[1,2,3,4,5],[2,3,4,50,60]])
#data1 = np.random.normal(10,1.0,1000)
#plt.hist(data1, bins=15, color=sns.desaturate("red", .8), alpha=1,histtype='stepfilled')
# bins 指的是直方图块数
#import numpy as np
#import matplotlib.pyplot as plt
#from matplotlib import cm
#from mpl_toolkits.mplot3d import Axes3D
#
#X = np.arange(-5, 5, 0.25)
#Y = np.arange(-5, 5, 0.25)
#X, Y = np.meshgrid(X, Y)
#R = np.sqrt(X**2 + Y**2)
#Z = np.sin(R)
#
#fig = plt.figure()
#ax = Axes3D(fig)
#ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.viridis)
#plt.subplot(2,2,1)
#plt.subplot(2,2,2)
#plt.subplot(2,2,3)
#plt.subplot(2,2,4)
#plt.subplot(2,1,1)
#plt.subplot(3,3,9)
#plt.subplot(3,3,8)
#plt.subplot(3,3,7)
#plt.subplot(3,3,6)
#plt.subplot(3,3,5)
#plt.subplot(3,3,4)
#plt.subplot(3,3,3)
#plt.subplot(3,3,2)
#plt.subplot(3,3,1)
#plt.subplot(1,3,2)
#plt.title("first")
#plt.subplot(1,3,1)
#plt.title("second")
data3 = pd.read_csv(r"C:\Users\chase\Desktop\myhexun.csv",encoding='gbk')
#print(data3.values[0][0])
data2 = data3.T
x = data2.values[2]
y = data2.values[3]
#plt.plot(x,y,'r--')
x1 = data2.values[4]
plt.plot(x1,y)
"""
Created on Sat Jun 2 09:33:53 2018
@author: chase
"""
#import numpy
#x = numpy.array([1,8,5,4])
#y = numpy.array([[1,4,3],[4,5,10],[7,18,9]])
#print(x)
#print(y)
#print(x.sort())
#print(y.sort())
#print(x.max())
#print(y.max())
#print(y[0:2])
import pandas as pd
#p = pd.read_csv(r"C:\Users\chase\Desktop\hexun.csv")
#print(p.describe())
#print(p.head())
#k = pd.read_html("http://datacenter.mep.gov.cn/websjzx/dataproduct/resourceproduct/queryResourceList.vm?rcode=01")
#print(k)
#k = pd.read_table("C:/Users/chase/Desktop/abc.txt")
# index_col=0:设置第1列数据作为index
#print(k['id 文章 阅读数'])
import matplotlib.pyplot as plt
import numpy as np
x = [1,2,3,4,5]
y = [10,9,18,57,26]
#plt.plot(x,y,'--')#
#plt.scatter(x,y,c='r') # c设置颜色
#plt.plot(x,y,"*--r")
"""
-实线 --短线 -.短点相间线 :虚点线
线条的颜色
b---blue c---cyan g---green k----black
m---magenta r---red w---white y----yellow
控制标记风格
标记风格有多种:
. Point marker
, Pixel marker
o Circle marker
v Triangle down marker
^ Triangle up marker
< Triangle left marker
> Triangle right marker
1 Tripod down marker
2 Tripod up marker
3 Tripod left marker
4 Tripod right marker
s Square marker
p Pentagon marker
* Star marker
h Hexagon marker
H Rotated hexagon D Diamond marker
d Thin diamond marker
| Vertical line (vlinesymbol) marker
_ Horizontal line (hline symbol) marker
+ Plus marker
x Cross (x) marker
"""
import matplotlib as mpl
# 设置中文显示
#mpl.rcParams['font.sans-serif'] = ['SimHei']
#plt.scatter(x,y,c='r',marker="*")
#plt.xlabel("hello")
#plt.ylabel(u"你个傻子")
#plt.title("test",fontsize=24)
data = np.random.randint(1,30,100)
from scipy.stats import norm
import seaborn as sns
# 正态分布
mu = 0
# 正确显示负数
mpl.rcParams['axes.unicode_minus']=False
#sigma = 1
#x = np.arange(-5, 5, 0.1)
#y = norm.pdf(x, 0, 1)
#plt.plot(x, y)
#plt.xlabel('x')
#plt.ylabel('density')
#plt.show()
#plt.hist2d([1,2,6,12,16],[10,90,8,70,6],[[1,2,3,4,5],[2,3,4,50,60]])
#data1 = np.random.normal(10,1.0,1000)
#plt.hist(data1, bins=15, color=sns.desaturate("red", .8), alpha=1,histtype='stepfilled')
# bins 指的是直方图块数
#import numpy as np
#import matplotlib.pyplot as plt
#from matplotlib import cm
#from mpl_toolkits.mplot3d import Axes3D
#
#X = np.arange(-5, 5, 0.25)
#Y = np.arange(-5, 5, 0.25)
#X, Y = np.meshgrid(X, Y)
#R = np.sqrt(X**2 + Y**2)
#Z = np.sin(R)
#
#fig = plt.figure()
#ax = Axes3D(fig)
#ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.viridis)
#plt.subplot(2,2,1)
#plt.subplot(2,2,2)
#plt.subplot(2,2,3)
#plt.subplot(2,2,4)
#plt.subplot(2,1,1)
#plt.subplot(3,3,9)
#plt.subplot(3,3,8)
#plt.subplot(3,3,7)
#plt.subplot(3,3,6)
#plt.subplot(3,3,5)
#plt.subplot(3,3,4)
#plt.subplot(3,3,3)
#plt.subplot(3,3,2)
#plt.subplot(3,3,1)
#plt.subplot(1,3,2)
#plt.title("first")
#plt.subplot(1,3,1)
#plt.title("second")
data3 = pd.read_csv(r"C:\Users\chase\Desktop\myhexun.csv",encoding='gbk')
#print(data3.values[0][0])
data2 = data3.T
x = data2.values[2]
y = data2.values[3]
#plt.plot(x,y,'r--')
x1 = data2.values[4]
plt.plot(x1,y)