I have a pandas data frame with a datetime index and some variable z
and I want to reproduce a plot similar to this:
(Image source: University of Edinburgh, http://www.geos.ed.ac.uk/homes/rclement/micromet/Current/griffin/carbon/)
This is often called a "fingerprint plot" in the CO2 flux community.
A year of sample data:
import pandas as pd
import numpy as np
n = 366*24
df = pd.DataFrame(index=pd.date_range(start='2016-01-01 00:00', freq='H', periods=n),
data={'z': np.random.randn(n)})
df["x"] = df.index.date
df["y"] = df.index.hour
df.head()
How do I proceed from here? I played around with the solution to this question: how to plot a heat map for three column data, but I can't get it to work with the datetime data.