Load the PROV-O-Matic Extension


In [7]:
%reload_ext provomatic.extension


ERROR:provomatic.viewer:HTTP Server failed to start (is it already running?)

Load the Example Provenance Graph

Load the example graph, and revive the latest z variable (see PROV-O-Matic Example notebook)


In [8]:
add_prov('http://example.com/provenance-example', url='http://localhost:8000/prov-o-matic-example-trail.ttl')

In [9]:
z = revive('z','http://provomatic.org/resource/z/3/e4da3b7fbbce2345d7772b0674a318d5')


INFO:provomatic.builder:Entity imported as variable of type '<type 'int'>'
INFO:provomatic.builder:URI:	http://provomatic.org/resource/z/3/e4da3b7fbbce2345d7772b0674a318d5
INFO:provomatic.builder:Time:	2014-09-30T15:06:01.791497
INFO:provomatic.builder:Imported value has tick 4

Simple demo of the fill function.

Taken from http://matplotlib.org/examples/lines_bars_and_markers/fill_demo.html


In [2]:
import numpy as np
import matplotlib.pyplot as plt

In [3]:
%matplotlib inline

The below cell uses the value of the imported z to compute y (this differs from the original example). It will also automatically recognize x and y as new versions of the entities in the imported trace.


In [10]:
x = np.linspace(0, 1)
y = np.sin(z * np.pi * x ) * np.exp(-5 * x)

In [11]:
plt.fill(x, y, 'r')
plt.grid(True)
plt.show()


Display Provenance Trace


In [12]:
view_prov()


WARNING:provoviz.views:Generating over 100 provenance graphs (185 to be precise)
Out[12]:

In [ ]: