Heatmap with date on horizontal and hour on vertical axis ("fingerprint plot")
<p>I have a pandas data frame with a datetime index and some variable <code>z</code> and I want to reproduce a plot similar to this: </p>

<p><a href="https://i.stack.imgur.com/TxAZI.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TxAZI.gif" alt="&quot;Fingerprint plot&quot; of CO2 fluxes"></a>
(Image source: University of Edinburgh, <a href="http://www.geos.ed.ac.uk/homes/rclement/micromet/Current/griffin/carbon/" rel="nofollow noreferrer">http://www.geos.ed.ac.uk/homes/rclement/micromet/Current/griffin/carbon/</a>)</p>

<p>This is often called a "fingerprint plot" in the CO2 flux community. </p>

<p>A year of sample data:</p>

<pre><code>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()
</code></pre>

<p>How do I proceed from here? I played around with the solution to this question:
<a href="https://stackoverflow.com/questions/18190861/how-to-plot-a-heat-map-for-three-column-data">how to plot a heat map for three column data</a>, but I can't get it to work with the datetime data.</p>