![]() ![]() Read: Matplotlib set_yticklabels Matplotlib scatter plot color by string To set the color of the legend, we pass facecolor parameter to the method.To add a legend to a plot, we use the legend() method.To create a scatter plot, we use the scatter() method.Here we define data coordinates using linespace(), cos(), and exp() method of numpy.The following is the syntax: (, facecolor=None) ![]() To set the color, use facecolor argument with the legend() method. Here we are going to see an example where we set the color of the legend plotted with a scatter plot. Read: Matplotlib set_xticklabels Matplotlib scatter plot color label
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |