@staticmethod<EOL><INDENT>def animate_phase_matrix(sync_output_dynamic, grid_width = None, grid_height = None, animation_velocity = <NUM_LIT>, colormap = '<STR_LIT>', save_movie = None):<DEDENT>
figure = plt.figure();<EOL>def init_frame(): <EOL><INDENT>return frame_generation(<NUM_LIT:0>);<EOL><DEDENT>def frame_generation(index_dynamic):<EOL><INDENT>figure.clf();<EOL>axis = figure.add_subplot(<NUM_LIT>);<EOL>phase_matrix = sync_output_dynamic.allocate_phase_matrix(grid_width, grid_height, index_dynamic);<EOL>axis.imshow(phase_matrix, cmap = plt.get_cmap(colormap), interpolation='<STR_LIT>', vmin = <NUM_LIT:0.0>, vmax = <NUM_LIT> * math.pi);<EOL>artist = figure.gca();<EOL>return [ artist ];<EOL><DEDENT>phase_animation = animation.FuncAnimation(figure, frame_generation, len(sync_output_dynamic), init_func = init_frame, interval = animation_velocity , repeat_delay = <NUM_LIT:1000>);<EOL>if (save_movie is not None):<EOL><INDENT>phase_animation.save(save_movie, writer = '<STR_LIT>', fps = <NUM_LIT:15>, bitrate = <NUM_LIT>);<EOL><DEDENT>else:<EOL><INDENT>plt.show();<EOL><DEDENT>
!
        @brief Shows animation of phase matrix between oscillators during simulation on 2D stage.
        @details If grid_width or grid_height are not specified than phase matrix size will by calculated automatically by square root.

        @param[in] sync_output_dynamic (sync_dynamic): Output dynamic of the Sync network.
        @param[in] grid_width (uint): Width of the phase matrix.
        @param[in] grid_height (uint): Height of the phase matrix.
        @param[in] animation_velocity (uint): Interval between frames in milliseconds.
        @param[in] colormap (string): Name of colormap that is used by matplotlib ('gray', 'pink', 'cool', spring', etc.).
        @param[in] save_movie (string): If it is specified then animation will be stored to file that is specified in this parameter.