How to specify the range for the histogram2dcontour?

I want to specify a range for the z-axis of a histogram2dcontour but just simply adding a:

zaxis: {
  range: [0, 5]

will do nothing. Here’s an example that I would like to show its z-axis only from 0 to 5:

Can someone please help me with this? Thanks.

For anyone else who might be facing the same question, here’s how you can do it.

For some reason, this setting is moved from the layout to the trace! Here’s the code:

var trace2 = {
  x: x,
  y: y,
  z: z,
  ncontours: 100,
  type: 'histogram2dcontour',
  zmin: 0,
  zmax: 5,

The zmin and zmax are attributes that control the minimum and maximum of the z axis.