def __new__(cls, ax=None, model=None, dis=None, line=None, xul=None, yul=None, rotation=None, extent=None): from flopy.plot.plotbase import DeprecatedCrossSection from flopy.discretization import StructuredGrid err_msg = "ModelCrossSection will be replaced by " +\ "PlotCrossSection(), Calling PlotCrossSection()" warnings.warn(err_msg, PendingDeprecationWarning) modelgrid = None if model is not None: if (xul, yul, rotation) != (None, None, None): modelgrid = plotutil._set_coord_info(model.modelgrid, xul, yul, None, None, rotation) elif dis is not None: modelgrid = StructuredGrid(delr=dis.delr.array, delc=dis.delc.array, top=dis.top.array, botm=dis.botm.array) if (xul, yul, rotation) != (None, None, None): modelgrid = plotutil._set_coord_info(modelgrid, xul, yul, None, None, rotation) return DeprecatedCrossSection(ax=ax, model=model, modelgrid=modelgrid, line=line, extent=extent)
def __new__(cls, ax=None, model=None, dis=None, line=None, xul=None, yul=None, rotation=None, extent=None): from flopy.plot.plotbase import DeprecatedCrossSection from flopy.discretization import StructuredGrid err_msg = "ModelCrossSection will be replaced by " +\ "PlotCrossSection(), Calling PlotCrossSection()" warnings.warn(err_msg, PendingDeprecationWarning) modelgrid = None if model is not None: if (xul, yul, rotation) != (None, None, None): modelgrid = plotutil._set_coord_info(model.modelgrid, xul, yul, None, None, rotation) elif dis is not None: modelgrid = StructuredGrid(delr=dis.delr.array, delc=dis.delc.array, top=dis.top.array, botm=dis.botm.array) if (xul, yul, rotation) != (None, None, None): modelgrid = plotutil._set_coord_info(modelgrid, xul, yul, None, None, rotation) return DeprecatedCrossSection(ax=ax, model=model, modelgrid=modelgrid, line=line, extent=extent)