@ Зараки,
Мне кажется, я нашел работу, которая, по крайней мере, удовлетворяет мои потребности.Я добавил два дополнительных
columns, data["numerical Col 1"]=np.nan and data["numerical Col 2"]=np.nan
Затем я сделал цикл по кадру и создал, если условие
import pandas as pd
import sys
import matplotlib.pyplot as plt
import numpy as np
data=pd.read_excel(r"C:\Users\116225\Desktop\test_table.xlsx")
data["numerical Col 1"]=np.nan
data["numerical Col 2"]=np.nan
for i in range(len(data["Col 1"])):
if data.at[i,"Col 1"]=="Low Humidity":
data.at[i,"numerical Col 1"]=np.random.randint(0,20)
else:
data.at[i,"numerical Col 1"]=np.random.randint(21,41)
if data.at[i,"Col 2"]=="Pulsmax":
data.at[i,"numerical Col 2"]=np.random.randint(0,20)
else:
data.at[i,"numerical Col 2"]=np.random.randint(21,41)
new_frame=data.copy()
x1, y1 = [20, 20], [0, 45]
x2, y2 = [-1, 45], [20, 20]
plt.plot(x1,y1,x2,y2,c="red")
plt.scatter(x=new_frame["numerical Col 1"],y=new_frame["numerical Col 2"],s=new_frame["Col 3"]*1e-3)
plt.tick_params(axis='both', left='off', top='off', right='off', bottom='off', labelleft='off', labeltop='off', labelright='off', labelbottom='off')
На скриншоте вы можете увидеть график рассеяния с двумя линиями, обозначающими границы:) 