sagemath-list_plot()改变点的大小

在SageMath中使用list_plot()绘制散点图时,默认点的大小较小。不同于Python的matplotlib,list_plot()不接受markersize参数。调节点大小需使用'size'或'pointsize'参数。例如,设置size=30或pointsize=50可以增大点的大小。参照SageMath手册,可以找到更多关于list_plot()函数的参数设置。
摘要由CSDN通过智能技术生成

sagemath中,使用list_plot()函数画散点图时,默认情况下的点的大小较小。

示例: 

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)

对比在python的matplotlib中,是通过markersize调节marker的大小:参考1 参考2

但在sagemath的list_plot中,不能用该参数调节。

如果将 上例中的函数改为:

plot1 = list_plot(zip(a,b),color=(0,.5,1),marker='o',ticks=[range(10),range(20)],legend_label='Original Data Points',markersize=50)
  • 3
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值