示例#1
0
文件: Vis.py 项目: westernguy2/lux
    def _to_matplotlib_svg(self) -> str:
        """
        Private method to render Vis as SVG with Matplotlib

        Returns
        -------
        str
                String version of the SVG.
        """
        from lux.vislib.matplotlib.MatplotlibRenderer import MatplotlibRenderer

        renderer = MatplotlibRenderer(output_type="matplotlib_svg")
        self._code = renderer.create_vis(self)
        return self._code
示例#2
0
文件: Vis.py 项目: westernguy2/lux
    def to_matplotlib(self) -> str:
        """
        Generate minimal Matplotlib code to visualize the Vis

        Returns
        -------
        str
                String version of the Matplotlib code. Need to print out the string to apply formatting.
        """
        from lux.vislib.matplotlib.MatplotlibRenderer import MatplotlibRenderer

        renderer = MatplotlibRenderer(output_type="matplotlib")
        self._code = renderer.create_vis(self)
        return self._code