code: def plot_matrix(ax, mat, t, render=False):
      plt.cla()
      ax.matshow(mat)
      ax.set_xticks([])
      ax.set_yticks([])
      plt.draw()
      if render:
          matplotlib.image.imsave("step{0:03d}.png".format(t), mat)
      plt.pause(0.001)
  
file_path: autograd/examples/fluidsim/fluidsim.py
imports: from __future__ import absolute_import
  from __future__ import print_function
  from builtins import range
  import autograd.numpy
  from autograd import value_and_grad
  from scipy.optimize import minimize
  from scipy.misc import imread
  import matplotlib
  import matplotlib.pyplot
  import os
label_desc: Use image node_id 4 for calling a global function with example usage: plot_matrix(ax, mat, t, render) without return types