How to change the shape of the marker depending on a column variable?
问题 I am trying to create a scatter plot for a csv file in python which contains 4 columns x , y , TL , L . I am supposed to plot x versus y and change the color of the marker based on the class ID in the TL column which I have achieved in the below code. import pandas as pd from matplotlib import pyplot as plt import numpy as np df=pd.read_csv('knnDataSet.csv') df.columns=['SN','x','y','TL','L'] color=['red','green','blue'] groups = df.groupby('TL') fig, ax = plt.subplots() for name, group in