I've seen this post about creating a heatmap of data.
My data is in a csv in the form of two columns with values from -1 to 1 (float)
sample data: lets call it "mydataframe"
Subjectivity Polarity
0 0.7432 -0.0012
1 -0.0111 1.0
...
The dataset contains over 100.000 rows. I tried it similar to the post like this:
import numpy as np
import numpy.random
import matplotlib.pyplot as plt
heatmap, xedges, yedges = np.histogram2d(df['Polarity'], df['Subjectivity'], bins=11)
extent = [xedges[0], xedges[-1], yedges[0], yedges[-1]]
plt.clf()
plt.imshow(heatmap.T, extent=extent, origin='lower')
plt.show()
My output looks like this:
I had to put a rather low value for "bins"(=11) to even see distribution beyond the "hot" 0.0, 0.0 spot.
Now what I would like to know is, how could I adjust the color scale in a way that the rest is not just dark purple/blue with one spot spiking out. So I want to tone down the one spot and amplify the rest. Is there a fitting parameter and how do I use it?
Also: How do I adjust the axis to have similar decimal representations?