sns.scatterplot(x='id', y='pulse', data=data, hue='time',palette='terrain') We can also give the name of any particular name color palette to plot these graphs. So as we can observe it has taken blue, orange and green color from the starting to represent the data of the categorical column. The above-given code will give us the output that will show the default color palette that seaborn uses. These three color has been taken by default. sns.scatterplot(x='id', y='pulse', data=data, hue='time')įrom the above output, we can observe that three-color blue, orange and green has been used to represent the hue which is set to the "time" column which is a categorical column in the given datasets. You can use any other type of plot of your own choice. This plot has been used to see whether color palette gets applied to the Plot successfully or not. Scatter Plot from the seaborn library is used to plot the data. Here the grid style has been set to darkgrid. import seaborn as snsĭata=sns.load_dataset('exercise') data.head(5) Here, the Exercise dataset has been taken from seaborn.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |