Files
coco 85d885e008 a
2026-07-03 16:29:47 +08:00

89 lines
2.1 KiB
Python

# coding: utf-8
# *排卵试纸机器学习算法验证*
# **import moudle**
# In[3]:
import numpy as np
import pandas as pd
import seaborn as sns
from IPython.display import display
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
try :
data_iphone6p_75_10 = pd.read_csv("20170912am.csv")
print "load data successful !!!!!"
except :
print "load data error !!!!!!!!!!"
# **分析数据**
# In[40]:
# In[48]:
data2= data_iphone6p_75_10
data1 = data2[data2["whiteBalance"] == 1 ]
whiteBlock_R_one =data1[data1["index"] == 7 ]["left_block_R"]
whiteBlock_G_one = data1[data1["index"] == 7 ]["left_block_G"]
whiteBlock_B_one = data1[data1["index"] == 7 ]["left_block_B"]
whiteBlock_R_two = data1[data1["index"] == 8 ]["left_block_R"]
whiteBlock_G_two = data1[data1["index"] == 8 ]["left_block_G"]
whiteBlock_B_two = data1[data1["index"] == 8 ]["left_block_B"]
whiteBlock_R_three = data1[data1["index"] == 5 ]["left_block_R"]
whiteBlock_G_three = data1[data1["index"] == 5 ]["left_block_G"]
whiteBlock_B_three = data1[data1["index"] == 5 ]["left_block_B"]
whiteBlock_R_four = data1[data1["index"] == 6 ]["left_block_R"]
whiteBlock_G_four = data1[data1["index"] == 6 ]["left_block_G"]
whiteBlock_B_four = data1[data1["index"] == 6 ]["left_block_B"]
# In[49]:
fig = plt.figure()
#plt.rcParams["figure.figsize"] = 20,20
ax = Axes3D(fig)
ax.set_xlim(0,255)
ax.set_ylim(0,255)
ax.set_zlim(0,255)
ax.set_xlabel('R')
ax.set_ylabel('G')
ax.set_zlabel('B')
ax.set_title('RGB colorspace')
# ax.scatter(whiteBlock_R_zero, whiteBlock_G_zero, whiteBlock_B_zero,s = 15,c='y')
ax.scatter(whiteBlock_R_one, whiteBlock_G_one, whiteBlock_B_one,s = 15,c='r')
ax.scatter(whiteBlock_R_two, whiteBlock_G_two, whiteBlock_B_two,s = 15,c='g')
ax.scatter(whiteBlock_R_three, whiteBlock_G_three, whiteBlock_B_three,s = 15,c='b')
ax.scatter(whiteBlock_R_four, whiteBlock_G_four, whiteBlock_B_four,s = 15,c='y')
#ax.scatter(whiteBlock_R_five, whiteBlock_G_five, whiteBlock_B_five,s = 15,c='y')
#ax.scatter(whiteBlock_R_six, whiteBlock_G_six, whiteBlock_B_six,s = 15,c='c')
plt.show()