plt.figure(figsize = (10,8))
plt.scatter(x_range, y_range, s=1, c=Avgs, cmap = 'hot')
plt.colorbar().set_label('Avgs', fontsize=14)
plt.xlabel('x', fontsize=14)
plt.ylabel('y', fontsize=14)
plt.title('ToA heatmap', fontsize=17)
plt.show()
I'm trying to plot simply an 8x8 grid and for each square in the grid I want to have the color based on a corresponding z-list. For the Avgs list I'm getting this error: ValueError: Invalid RGBA argument: 978641729006.499
x and y are just 8x8: x_range = [*range(1,9)] y_range = [*range(1,9)]
and z is length 64.
I'm actually trying to go off of the last plot in this: https://towardsdatascience.com/two-dimensional-histograms-and-three-variable-scatterplots-making-map-like-visualisations-in-7f413955747
Is there something wrong with the z-vals I'm trying to use?
Avgs = [978641729006.499, 978641729400.8718, 978641729104.939, 978641729955.9729, 978987521304.7899, 978641730148.7137, 978641729455.2655, 978641729920.0767, 978641729629.279, 978641730085.0204, 978641729865.4275, 977317126354.3619, 978623695074.3928, 976261941754.0288, 978219139240.5585, 977297545709.2174, 978641729701.3525, 978641730366.5692, 978641730164.7329, 978320088204.468, 980484773299.2648, 979024582561.7308, 978583203617.9937, 979500695052.7529, 978641729194.0791, 978641729650.9701, 978641729445.3525, 978641729906.5613, 978641729793.7373, 978971834612.6752, 978641729959.2432, 978641730895.917, 978641729877.5889, 978958815999.003, 978641730412.9406, 978641730936.1565, 978641731045.608, 981320625644.9747, 978641731431.1409, 979100728947.8063, 978252805749.7512, 978692284847.6948, 978839590344.0538, 977759736772.8792, 978278403900.65, 977963671775.7217, 978020959030.8743, 975589489530.2675, 978641729128.0607, 978641729732.8032, 978641729472.7153, 978641730005.691, 978641730299.7589, 979914042136.2838, 978641729454.6012, 978641729870.9205, 978641728254.5948, 978641729076.9629, 978641728896.7665, 978641729508.8926, 978641729493.4355, 978654395498.1919, 978641728998.9877, 978641729249.6735]