def convert_x_domain(mpl_plot_bounds, mpl_max_x_bounds):
 mpl_x_dom = [mpl_plot_bounds[0], (mpl_plot_bounds[0] + mpl_plot_bounds[2])]
 plotting_width = (mpl_max_x_bounds[1] - mpl_max_x_bounds[0])
 x0 = ((mpl_x_dom[0] - mpl_max_x_bounds[0]) / plotting_width)
 x1 = ((mpl_x_dom[1] - mpl_max_x_bounds[0]) / plotting_width)
 return [x0, x1]

def convert_x_domain ( mpl_plot_bounds , mpl_max_x_bounds ) : mpl_x_dom = [ mpl_plot_bounds [ 0 ] , ( mpl_plot_bounds [ 0 ] + mpl_plot_bounds [ 2 ] ) ] plotting_width = ( mpl_max_x_bounds [ 1 ] - mpl_max_x_bounds [ 0 ] ) x0 = ( ( mpl_x_dom [ 0 ] - mpl_max_x_bounds [ 0 ] ) / plotting_width ) x1 = ( ( mpl_x_dom [ 1 ] - mpl_max_x_bounds [ 0 ] ) / plotting_width ) return [ x0 , x1 ]
map x dimension of current plot to plotlys domain space .