![]() First, we have imported a new library, NumPy, and given an alias ‘np’.Plt.scatter(x = height, y = diameter, c = tree_height, s = actual_height * 10) Height = np.asarray()ĭiameter = np.asarray()Īctual_height = np.asarray() Let’s see how to use it with the help of an example. If we want to increase the height of the data points, we can use the size parameter ‘s’ in the scatter-plot method. In the scatter-plot method, we have introduced an optional parameter, ‘c’, which denotes the color of the data points.After that, we have defined tree_height as a list, and this list contains those tuple values, which are nothing but the colors green, yellow, and red.The tuples have high, medium, and low mean red, yellow, and green colors. ![]() Each tuple contains three values representing the red, green, and blue color components.
0 Comments
Leave a Reply. |