def convert_y_domain(mpl_plot_bounds, mpl_max_y_bounds):
 mpl_y_dom = [mpl_plot_bounds[1], (mpl_plot_bounds[1] + mpl_plot_bounds[3])]
 plotting_height = (mpl_max_y_bounds[1] - mpl_max_y_bounds[0])
 y0 = ((mpl_y_dom[0] - mpl_max_y_bounds[0]) / plotting_height)
 y1 = ((mpl_y_dom[1] - mpl_max_y_bounds[0]) / plotting_height)
 return [y0, y1]

def convert_y_domain ( mpl_plot_bounds , mpl_max_y_bounds ) : mpl_y_dom = [ mpl_plot_bounds [ 1 ] , ( mpl_plot_bounds [ 1 ] + mpl_plot_bounds [ 3 ] ) ] plotting_height = ( mpl_max_y_bounds [ 1 ] - mpl_max_y_bounds [ 0 ] ) y0 = ( ( mpl_y_dom [ 0 ] - mpl_max_y_bounds [ 0 ] ) / plotting_height ) y1 = ( ( mpl_y_dom [ 1 ] - mpl_max_y_bounds [ 0 ] ) / plotting_height ) return [ y0 , y1 ]
map y dimension of current plot to plotlys domain space .