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
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