绘图(Plotting)

The Plotting docs.

Make Matplotlib look like R

Setting x-axis major and minor labels

Plotting multiple charts in an ipython notebook

Creating a multi-line plot

Plotting a heatmap

Annotate a time-series plot

Annotate a time-series plot #2

Generate Embedded plots in excel files using Pandas, Vincent and xlsxwriter

Boxplot for each quartile of a stratifying variable

  1. In [156]: df = pd.DataFrame(
  2. .....: {u'stratifying_var': np.random.uniform(0, 100, 20),
  3. .....: u'price': np.random.normal(100, 5, 20)})
  4. .....:
  5. In [157]: df[u'quartiles'] = pd.qcut(
  6. .....: df[u'stratifying_var'],
  7. .....: 4,
  8. .....: labels=[u'0-25%', u'25-50%', u'50-75%', u'75-100%'])
  9. .....:
  10. In [158]: df.boxplot(column=u'price', by=u'quartiles')
  11. Out[158]: <matplotlib.axes._subplots.AxesSubplot at 0x7f210fbc2668>

k线图