In [31]:
# We can recover an array saved into and re-replot the chart
# Query is assincronous, we must wait the object be catalogued
# So it can take a while to work in this example.
spectrum = context.portal_catalog.getResultvalue(
title="pydata-spectrum2-to-recover”,
portal_type="Data Array")
figure = plt.figure()
ax1 = figure.add_subplot(211)
ax1.plot (spectrun.getArray())
# figure.show() don't present inline rendering....
# 50 we use instead:
context .Base_renderAsHtml(plt)
1.8 1e8
16
14
12
10
0.8
0.6
0.4
0.2
0.0
0 100000 200000 300000
400000
500000