Feyn

Feyn

  • Tutorials
  • Guides
  • API Reference
  • FAQ

›Advanced

Getting Started

  • Quick Start

Using Feyn

  • Introduction to the basic workflow
  • Asking the right questions
  • Formulate hypotheses
  • Analysing and selecting hypotheses
  • What comes next?

Essentials

  • Defining input features
  • Classifiers and Regressors
  • Filtering a QGraph
  • Predicting with a graph
  • Inspection plots
  • Saving and loading graphs
  • Updating your QLattice

Setting up the QLattice

  • Installation
  • Accessing your QLattice
  • Firewalls and proxies
  • QLattice dashboard

Advanced

  • Converting a graph to SymPy
  • Setting themes
  • Saving a graph as an image
  • Tuning the fitting process
  • Causal estimation

Future

  • Future package
  • Diagnostics
  • Inspection
  • Reference

Saving a graph as an image

by: Kevin Broløs
(Feyn version 1.4 or newer)

Our graphs are rendered in SVG, but in some cases, you might want to export them for other uses.

As of now, the way to do that is to get the SVG string from our renderer using the function _repr_svg_, and save it to a file.

Here's an example:

from feyn import QLattice
qlattice = QLattice()
qgraph = qlattice.get_classifier(['Hello'], 'World')

g = qgraph[0]
with open(f'./graph0.svg', 'w') as fd:
    fd.write(g._repr_svg_())

a graph image

← Setting themesTuning the fitting process →
Copyright © 2021 Abzu.ai