def plot(self, **options): r""" Plot ``self``. INPUT: - any options for toric plots (see :func:`toric_plotter.options <sage.geometry.toric_plotter.options>`), none are mandatory. OUTPUT: - a plot. EXAMPLES:: sage: N = ToricLattice(3) sage: N.plot() Graphics3d Object """ if "show_lattice" not in options: # Unless user made an explicit decision, we assume that lattice # should be visible no matter what is the size of the bounding box. options["show_lattice"] = True tp = ToricPlotter(options, self.degree()) tp.adjust_options() return tp.plot_lattice()
def plot(self, **options): r""" Plot ``self``. INPUT: - any options for toric plots (see :func:`toric_plotter.options <sage.geometry.toric_plotter.options>`), none are mandatory. OUTPUT: - a plot. EXAMPLES:: sage: N = ToricLattice(3) sage: sublattice = N.submodule_with_basis([(1,1,0), (3,2,1)]) sage: sublattice.plot() Now we plot both the ambient lattice and its sublattice:: sage: N.plot() + sublattice.plot(point_color="red") """ if "show_lattice" not in options: # Unless user made an explicit decision, we assume that lattice # should be visible no matter what is the size of the bounding box. options["show_lattice"] = True if "lattice_filter" in options: old = options["lattice_filter"] options["lattice_filter"] = lambda pt: pt in self and old(pt) else: options["lattice_filter"] = lambda pt: pt in self tp = ToricPlotter(options, self.degree()) tp.adjust_options() return tp.plot_lattice()
def plot(self, **options): r""" Plot ``self``. INPUT: - any options for toric plots (see :func:`toric_plotter.options <sage.geometry.toric_plotter.options>`), none are mandatory. OUTPUT: - a plot. EXAMPLES:: sage: N = ToricLattice(3) sage: N.plot() """ if "show_lattice" not in options: # Unless user made an explicit decision, we assume that lattice # should be visible no matter what is the size of the bounding box. options["show_lattice"] = True tp = ToricPlotter(options, self.degree()) tp.adjust_options() return tp.plot_lattice()