When using the list plot() function to draw a scatter diagram, the size of the points is smaller by default.
a=range(10) b=(random()*20 for _ in range(10)) array=[] plot1 = list_plot(zip(a,b),color=(0,.5,1),marker='o',ticks=[range(10),range(20)],legend_label='Original Data Points') plot1.axes_labels(['x coordinate ','y coordinate']) plot1.axes_labels_size(1.2) plot1.legend(True) plot1.show(frame=True)
In matplotlib, the size of the marker is adjusted by marker size: Reference 1 Reference 2
However, in list plot, this parameter cannot be used for adjustment.
If you change the function in the above example to:
plot1 = list_plot(zip(a,b),color=(0,.5,1),marker='o',ticks=[range(10),range(20)],legend_label='Original Data Points',markersize=50)
Here's a hint:
verbose 0 (163: primitive.py, options) WARNING: Ignoring option 'markersize'=50 verbose 0 (163: primitive.py, options) The allowed options for Point set defined by 10 point(s) are: alpha How transparent the point is. faceted If True color the edge of the point. (only for 2D plots) hue The color given as a hue. legend_color The color of the legend text legend_label The label for this item in the legend. marker the marker symbol for 2D plots only (see documentation of plot() for details) markeredgecolorthe color of the marker edge (only for 2D plots) rgbcolor The color as an RGB tuple. size How big the point is (i.e., area in points^2=(1/72 inch)^2). zorder The layer level in which to draw verbose 0 (163: primitive.py, options) WARNING: Ignoring option 'markersize'=50 verbose 0 (163: primitive.py, options) The allowed options for Point set defined by 10 point(s) are: alpha How transparent the point is. faceted If True color the edge of the point. (only for 2D plots) hue The color given as a hue. legend_color The color of the legend text legend_label The label for this item in the legend. marker the marker symbol for 2D plots only (see documentation of plot() for details) markeredgecolorthe color of the marker edge (only for 2D plots) rgbcolor The color as an RGB tuple. size How big the point is (i.e., area in points^2=(1/72 inch)^2). zorder The layer level in which to draw verbose 0 (163: primitive.py, options) WARNING: Ignoring option 'markersize'=50 verbose 0 (163: primitive.py, options) The allowed options for Point set defined by 10 point(s) are: alpha How transparent the point is. faceted If True color the edge of the point. (only for 2D plots) hue The color given as a hue. legend_color The color of the legend text legend_label The label for this item in the legend. marker the marker symbol for 2D plots only (see documentation of plot() for details) markeredgecolorthe color of the marker edge (only for 2D plots) rgbcolor The color as an RGB tuple. size How big the point is (i.e., area in points^2=(1/72 inch)^2). zorder The layer level in which to draw
It can be seen that the setting of markersize=50 is ignored. The 10 parameter given is the size parameter. Therefore, the parameters in the list_plot() function are set to size:.
plot1 = list_plot(zip(a,b),color=(0,.5,1),marker='o',ticks=[range(10),range(20)],legend_label='Original Data Points',size=50)
According to sage manual Refer to the keyword setting of plot() for the list [plot] parameter setting of page:30.
help(plot)
Show about size:
The algorithm used to insert extra points is actually pretty simple. On the picture drawn by the lines below:: sage: p = plot(x^2, (-0.5, 1.4)) + line([(0,0), (1,1)], color='green') sage: p += line([(0.5, 0.5), (0.5, 0.5^2)], color='purple') sage: p += point(((0, 0), (0.5, 0.5), (0.5, 0.5^2), (1, 1)), color='red', pointsize=20) sage: p += text('A', (-0.05, 0.1), color='red') sage: p += text('B', (1.01, 1.1), color='red') sage: p += text('C', (0.48, 0.57), color='red') sage: p += text('D', (0.53, 0.18), color='red') sage: p.show(axes=False, xmin=-0.5, xmax=1.4, ymin=0, ymax=2)
It can also be adjusted through pointsize:
a=range(10) b=(random()*20 for _ in range(10)) array=[] plot1 = list_plot(zip(a,b),color=(0,.5,1),marker='o',ticks=[range(10),range(20)],legend_label='Original Data Points',pointsize=50) plot1.axes_labels(['x coordinate ','y coordinate']) plot1.axes_labels_size(1.2) plot1.legend(True) plot1.show(frame=True)
Set the effect of pointsize=50.