pandas 图()没有图例 [英] Pandas plot() without a legend
问题描述
在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屋!