Skip to content

Instantly share code, notes, and snippets.

@ptweir
Last active June 3, 2016 19:41
Show Gist options
  • Save ptweir/d7f77b492710573ed005ca92ba09b568 to your computer and use it in GitHub Desktop.
Save ptweir/d7f77b492710573ed005ca92ba09b568 to your computer and use it in GitHub Desktop.
import numpy as np
import matplotlib.pyplot as plt
from figurefirst import FigureLayout
layout = FigureLayout('hello_world_layout.svg')
layout.make_mplfigures()
ax = layout.axes['ax_name']['axis']
x = np.arange(10)
y = x**2
ax.plot(x, y, lw=4)
layout.insert_figures('target_layer_name')
layout.write_svg('hello_world_output.svg')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment