使用 matplotlib 的 plotfile 函数时的散点图而不是线图 [英] scatterplot instead of a lineplot while using the plotfile function of matplotlib

查看:68
本文介绍了使用 matplotlib 的 plotfile 函数时的散点图而不是线图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道plotfile的一般用法:

I know the general usage of plotfile:

import matplotlib.pyplot as plt

plt.plotfile(csvfile,sometuple)

但默认情况下会生成线图.我想要一个散点图.我需要传递给此方法一些特殊的论点吗?我已经查看了文档,却没有找到任何东西.

But this produces a line plot by default. I want a scatterplot. Is there some special argument that i need to pass to this method? I have already looked into the documentation and didnt find anything.

推荐答案

我自己看不到 plotfile 的优点:只要你想做任何有趣的事情,使用通常的指令可能会更容易.但是

I don't see the advantages of plotfile, myself: as soon as you want to do anything interesting it's probably easier to work with the usual directives. But

matplotlib.pyplot.plotfile('dat.csv',(0,1),linestyle="",marker="o")

应该用点代替线.

这篇关于使用 matplotlib 的 plotfile 函数时的散点图而不是线图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆