<｜begin▁of▁sentence｜>### Instruction:
Given a simple undirected graph with the edges set [(1, 2), (2, 3), (3, 1)], how would you use MatplotlibMatrixDrawer from the networkx library to draw the adjacency matrix of the graph on a given matplotlib Axes?
### Response:
import networkx as nx
import matplotlib.pyplot as plt
from networkx.drawing.nx_pylab import MatplotlibMatrixDrawer

G = nx.Graph()
G.add_edges_from([(1, 2), (2, 3), (3, 1)])
fig, ax = plt.subplots()
matrix_drawer = MatplotlibMatrixDrawer(ax=ax)
matrix_drawer.draw((nx.to_numpy_matrix(G) != 0).astype(int))
plt.show()
<|EOT|>
