python怎么画一个点,如何在python中绘制没有曲线的单个点?

在Python中,如果你想在图表上显示带有误差条的单个数据点,但不想显示连接这些点的曲线,可以使用scatter()函数或者设置linestyle为'invisible'或'none'。例如,`plt.scatter(x, y)`或`plt.plot(x, y, 'o', linestyle='none')`。如果需要添加误差条,可以使用`plt.errorbar()`。要改变标记颜色,可以直接指定color参数,如`color='red'`或`color='blue'`。" 124680894,7790546,TI Sitara AM5728+FPGA高端评估板:异构多核开发详解,"['嵌入式硬件', 'FPGA开发', 'arm', 'Linux']
摘要由CSDN通过智能技术生成

I want to plot individual data points with error bars on a plot, but I don't want to have the curve. How can I do this? Are there some 'invisible' line style or can I set the line style colourless (but the marker still has to be visible)?

So this is the graph I have right now:

plt.errorbar(x5,y5,yerr=error5, fmt='o')

plt.errorbar(x3,y3,yerr=error3, fmt='o')

plt.plot(x3_true,y3_true, 'r--', label=(r'$\lambda = 0.3$'))

plot(x5_true, y5_true, 'b--', label=(r'$\lambda = 0.5$'))

plt.plot(x5,y5, linestyle=':', marker='o', color='red') #this is the 'ideal' curve that I want to add

plt.plot(x3,y3, linestyle=':', marker='o', color='red')

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值