We will use the converted codes to “c”‘s argument. Therefore, we first have to convert the character variable into a categorical variable and then into numerical variable using “cat.codes” on categorical variable. We need them as numerical numbers corresponding to each group. If you want to change the default blue color you can set a new color. However, the variable we want to use to color that data points is stored as character/string variable in the dataframe. The scatter function provides several arguments to customize the markers in several ways.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |