Suppose I have the following code that plots something very simple using 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')
How do I easily set x and y-labels while preserving my ability to use specific colormaps? I noticed that the plot()
wrapper for pandas DataFrames doesn't take any parameters specific for that.
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…