【发布时间】:2014-02-24 13:49:46
【问题描述】:
假设我有以下代码,它使用 pandas 绘制了一些非常简单的东西:
import pandas as pd
values = [[1, 2], [2, 5]]
df2 = pd.DataFrame(values, columns=['Type A', 'Type B'],
index=['Index 1', 'Index 2'])
df2.plot(lw=2, colormap='jet', marker='.', markersize=10,
title='Video streaming dropout by category')
如何在保留使用特定颜色图的能力的同时轻松设置 x 和 y 标签?我注意到 pandas DataFrames 的 plot() 包装器不采用任何特定的参数。
【问题讨论】:
-
现在是正确的answer
标签: python pandas dataframe matplotlib