![]() ![]() Because the s= parameter also accepts an array of values, we can simply pass in that array. Let’s say we had another dimension to our data, we can use the values in that dimension to control the size. In this section, we’ll look at using another set of values to set the size of matplotlib scatterplot markers. Changing the Marker Size for Individual Points in Matplotlib Scatterplots Based on Other Data In order to get a marker that is, say, size 10, we need to pass in the square of that. The s parameter is defined as the marker size in points ** 2, meaning that the value passed in is squared. To understand what the s= parameter controls, we need to take a look at the documentation. Plt.title('Changing Marker Sizes for All Points - datagy.io')Ĭhanging the marker size for all markers in Matplotlib Let’s see how we can change the size for all markers using the s= parameter: # Changing the size for all markers in Matplotlib
0 Comments
Leave a Reply. |