does anyone know how to make a grid using matplotlib which essentially looks like a chess board. It needs to have black and white squares.
Thank you for your help.
does anyone know how to make a grid using matplotlib which essentially looks like a chess board. It needs to have black and white squares.
Thank you for your help.
An easy way to do this is to set a 2d matrix with elements 0,1 for example as your chessboard. Then use imshow from matplotlib.pyplot and use the gray scale for it.
This is a simple example of a 4 squares chessboard
import matplotlib.pyplot as plt
a = [[0,1],[1,0]]
plt.imshow(a,cmap='gray')
plt.show()