I'm generating a heatmap using plotly and then changing the colorscale. If the values of the heatmap are all positive, this then results in a colorscale that doesn't span the full range of color.
How can I fix this?
Input
import pandas as pd
import numpy as np
import plotly.offline as py
import cufflinks as cf
cf.go_offline()
index = range(500)
columns = range(20)
df = pd.DataFrame(np.random.randn(500, 20) + 100, index=index, columns=columns)
fig = df.iplot(kind='heatmap', colorscale='Rdbu', asFigure=True)
fig['data'][0].update(colorscale='Redblue')
py.iplot(fig)
Output
See the interactive graph.