function newPlot(gd, data, layout, config) {
    gd = Lib.getGraphDiv(gd);

    // remove gl contexts
    Plots.cleanPlot([], {}, gd._fullData || [], gd._fullLayout || {});

    Plots.purge(gd);
    return exports._doPlot(gd, data, layout, config);
}
Convenience function to make idempotent plot option obvious to users.

@param gd
@param {Object[]} data
@param {Object} layout
@param {Object} config