df.plot.bar(fontsize=20) 线条样式 对于折线图来说,还可以设置线条样式style df.plot(style = ['.-','--','*-']# 圆点、虚线、星星 ) 色系 通过colormap参数可以指定色系,色系选择可以参考matplotlib库的色系表 # 指定色系 x = df.plot.bar(colormap='rainbow') ...
plt.rcParams['axes.unicode_minus']=False plot方法默认是折线图,而它还支持以下几类图表类型: ‘line’ : 折线图 (default) ‘bar’ : 柱状图 ‘barh’ : 条形图 ‘hist’ : 直方图 ‘box’ : 箱型图 ‘kde’ : 密度图 ‘density’ : 同密度图 ‘area’ : 面积图 ‘pie’ : 饼图 ‘scatter’ ...
fontsize=None, colormap=None, position=0.5, table=False, yerr=None, xerr=None, stacked=True/False, sort_columns=False,secondary_y=False, mark_right=True, **kwds) 1.1 参数介绍 x和y:表示标签或者位置,用来指定显示的索引,默认为None kind:表示绘图的类型,默认为line,折线图 line:折线图 bar/bar...
colormap : str or matplotlib colormap object, default None#设置图的区域颜色 Colormap to select colors from. If string, load colormap with that name from matplotlib. colorbar : boolean, optional #图片柱子 If True, plot colorbar (only relevant for ‘scatter’ and ‘hexbin’ plots) position...
colormap:可用于指定要绘制的多种颜色 hovertool:如果 True 悬停工具处于活动状态,否则如果为 False 则不绘制悬停工具 hovertool_string:如果指定,此字符串将用于悬停工具(@{column} 将替换为鼠标悬停在元素上的列的值) toolbar_location:指定工具栏位置的位置(None, ...
A.plot(yticks=[0,300,600])#y轴上显示出0 300 600刻度 xlim(min,max)或[min,max]最大最小刻度值 ylim(min,max)或[min,max] rotintNonex轴坐标刻度的旋转角度 fontsizeintNone坐标刻度文字大小 colormapstr、matplotlib colormap objectNone色表 ...
plot方法默认是折线图,而它还支持以下几类图表类型: ‘line’ : 折线图 (default) ‘bar’ : 柱状图 ‘barh’ : 条形图 ‘hist’ : 直方图 ‘box’ : 箱型图 ‘kde’ : 密度图 ‘density’ : 同密度图 ‘area’ : 面积图 ...
rot:轴标签(轴刻度)的显示旋转度数,默认Nonefontsize :int, defaultNone#设置轴刻度的字体大小colormap:设置图的区域颜色 colorbar:柱子颜色 position:柱形图的对齐方式,取值范围[0,1],默认0.5(中间对齐) table:图下添加表,默认False。若为True,则使用DataFrame中的数据绘制表格 ...
colormap : str or matplotlib colormap object, default None#设置图的区域颜色 Colormap to select colors from. If string, load colormap with that name from matplotlib. colorbar : boolean, optional #图片柱子 If True, plot colorbar (only relevant for ‘scatter’ and ‘hexbin’ plots) ...
import pandas as pd # 创建一个DataFrame对象 data = {'x': [1, 2, 3, 4, 5], 'y': [10, 20, 15, 25, 30]} df = pd.DataFrame(data) # 绘制折线图,并设置参数 df.plot(x='x', y='y', kind='line', title='折线图', xlabel='时间', ylabel='数值', color='red', linewid...