pandas 图()没有图例 [英] Pandas plot() without a legend

查看:83
本文介绍了 pandas 图()没有图例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在python中使用pandas库并使用

Using the pandas library in python and using

.plot()

在数据框上,如何显示没有图例的图?

on a dataframe, how do I display the plot without a legend?

推荐答案

函数中有一个对应于图例的参数;默认情况下为True

There is a parameter in the function corresponding to legend; by default it is True

df.plot(legend=False)

以下是.plot()方法的定义

定义:df.plot(frame = None,x = None,y = None,subplots = False,sharex = True,sharey = False,use_index = True,figsize = None,grid = None,legend = True,rot = None,ax = None,style = None,title = None,xlim = None,ylim = None,logx = False,logy = False,xticks = None,yticks = None,kind ='line',sort_columns = False,fontsize = None,secondary_y = False,** kwds)

Definition: df.plot(frame=None, x=None, y=None, subplots=False, sharex=True, sharey=False, use_index=True, figsize=None, grid=None, legend=True, rot=None, ax=None, style=None, title=None, xlim=None, ylim=None, logx=False, logy=False, xticks=None, yticks=None, kind='line', sort_columns=False, fontsize=None, secondary_y=False, **kwds)

这篇关于 pandas 图()没有图例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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