2D Data Visualization

import matplotlib.pyplot as plt
%matplotlib inline

def graph_grid(grid):
    plt.imshow(grid, cmap='Greys', clim=(0,.1))
    plt.title('Heat Map of Grid Probabilities')
    plt.xlabel('grid x axis')
    plt.ylabel('grid y axis')
    plt.legend()
    plt.show()
grid = [[.05, .1, .1],
        [.04, .3, .02],
        [.01, .023, .017],
        [.005, .012, .06],
        [.09, .07, .103]]

graph_grid(grid)

Calculating Probability

Last updated

Was this helpful?