Reputation: 1936
Is there an equivalent plotting function and/or a simple way to make this plot.ly plot in python in "pure" python using e.g. matplotlib?
Just wondering if there is an equivalent function or similar. Cannot find any, or am not searching for the right thing. "heatmap python" only comes up with square plots, and changing their shape seems cumbersome.
Upvotes: 0
Views: 286
Reputation: 36732
Building on Hun answer, if you don't want your eyes to hurt too much, you can use an alternate color map. Here viridis
import matplotlib.pyplot as plt
import numpy as np
Z = np.random.rand(6, 100)
c = plt.pcolor(Z, cmap='viridis')
plt.show()
and remember: pyplot
& numpy
will keep your namespace tidy...
Upvotes: 1
Reputation: 3857
To give you a simple example, the following will generate the attached plot.
from pylab import *
Z = rand(6, 100) # tried to make it look similar to your plot
c = pcolor(Z)
show()
Upvotes: 1