neuroprob/utils/plot.py
def render_image(fig):
    """
    Render an image from a figure buffer.
    
    :param list colors: colors to be included in the colormap
    :param string name: name the colormap
    :returns: figure and axis
    :rtype: tuple
    """
    fig.canvas.draw() # draw the canvas, cache the renderer
    image = np.frombuffer(fig.canvas.tostring_rgb(), dtype='uint8')
    image = image.reshape(fig.canvas.get_width_height()[::-1] + (3,))
    return image

    Render an image from a figure buffer.
    
    :param list colors: colors to be included in the colormap
    :param string name: name the colormap
    :returns: figure and axis
    :rtype: tuple
    
Render an image from a figure buffer.
Render an image from a figure buffer .
def render_image(fig):
    fig.canvas.draw() 
    image = np.frombuffer(fig.canvas.tostring_rgb(), dtype='uint8')
    image = image.reshape(fig.canvas.get_width_height()[::-1] + (3,))
    return image
def render_image ( fig ) : fig . canvas . draw ( ) image = np . frombuffer ( fig . canvas . tostring_rgb ( ) , dtype = 'uint8' ) image = image . reshape ( fig . canvas . get_width_height ( ) [ : : - 1 ] + ( 3 , ) ) return image
Render an image from a figure buffer.
Render an image from a figure buffer .
"""
    Render an image from a figure buffer.
    
    :param list colors: colors to be included in the colormap
    :param string name: name the colormap
    :returns: figure and axis
    :rtype: tuple
    """ # draw the canvas, cache the renderer
figure and axis
figure and axis
tuple
fig
colors
colors to be included in the colormap
colors to be included in the colormap
name
name the colormap
name the colormap