根据某地区气温数据绘制峰峦图,数据源来自EPW气象数据集。
import joypy
import pandas as pd
import numpy as np
from matplotlib import pyplot as plt
from matplotlib import cm
%matplotlib inline
temp = pd.read_csv(r"C:\Users\aaa\Desktop\temperature.csv",comment="%")
temp.head()
labels=[m if m%1==0 else None for m in list(temp.Month.unique())]
fig, axes = joypy.joyplot(temp, by="Month", column="Temperature", labels=labels, range_style='own',
grid=True, linewidth=1, legend=False, figsize=(6,5),
title="Global daily temperature 1880-2014 \n(°C above 1950-80 average)",
colormap=cm.autumn_r)
![ebf0c6c587a072e8fffb884ae2c342f4.png](en-resource://database/2943:1)
[Joypy 源码](https://github.com/sbebo/joypy/blob/master/Joyplot.ipynb)