def display_yt(data_object, field):
    # Note what we are doing here: we are taking *views* of these,
    # as the logic in the ndarray traittype doesn't check for subclasses.
    frb = FRBViewer(px = data_object["px"].d,
                    py = data_object["py"].d,
                    pdx = data_object["pdx"].d,
                    pdy = data_object["pdy"].d,
                    val = data_object[field].d)
    controls = frb.setup_controls()
    return ipywidgets.HBox([controls, frb])
Example #2
0
def display_yt(data_object, field):
    # Note what we are doing here: we are taking *views* of these,
    # as the logic in the ndarray traittype doesn't check for subclasses.
    frb = WidgytsCanvasViewer.from_obj(data_object, field)
    controls = frb.setup_controls()
    return ipywidgets.HBox([controls, frb])