def magphase_databoxes(ds, xscript=0, yscript='d[1]+1j*d[2]', eyscript=None, exscript=None, g=None, **kwargs):
    """
    Use databoxes and scripts to generate data and plot the complex magnitude
    and phase versus xdata.

    Parameters
    ----------
    ds        
        List of databoxes
    xscript=0 
        Script for x data
    yscript='d[1]+1j*d[2]'  
        Script for y data
    eyscript=None  
        Script for y error
    exscript=None
        Script for x error
    g=None
        Optional dictionary of globals for the scripts

    See spinmob.plot.magphase.data() for additional optional keyword arguments.
    See spinmob.data.databox.execute_script() for more information about scripts.
    """
    databoxes(ds, xscript, yscript, eyscript, exscript, plotter=magphase_data, g=g, **kwargs)
Use databoxes and scripts to generate data and plot the complex magnitude
    and phase versus xdata.

    Parameters
    ----------
    ds        
        List of databoxes
    xscript=0 
        Script for x data
    yscript='d[1]+1j*d[2]'  
        Script for y data
    eyscript=None  
        Script for y error
    exscript=None
        Script for x error
    g=None
        Optional dictionary of globals for the scripts

    See spinmob.plot.magphase.data() for additional optional keyword arguments.
    See spinmob.data.databox.execute_script() for more information about scripts.