

def main():
    from time import time
    import matplotlib.pyplot as plt
    (x, y) = np.mgrid[0:2000, 0:2000]
    data = (np.sin((x / 10.0)) * np.cos((y / 30.0)))
    f = plt.figure()
    ax = f.add_subplot(111)
    artist = ModestImage(ax, data=data)
    ax.set_aspect('equal')
    artist.norm.vmin = (- 1)
    artist.norm.vmax = 1
    ax.add_artist(artist)
    ax.set_xlim(0, 1000)
    ax.set_ylim(0, 1000)
    t0 = time()
    plt.gcf().canvas.draw()
    t1 = time()
    print(('Draw time for %s: %0.1f ms' % (artist.__class__.__name__, ((t1 - t0) * 1000))))
    plt.show()

dataset/ETHPy150Open glue-viz/glue/glue/external/modest_image.py main/original