5 > import matplotlib.pyplot as plt
\r
9 > x, y = np.random.randn(2, 100)
\r
10 > fig = plt.figure()
\r
11 > ax1 = fig.add_subplot(211)
\r
12 > ax1.xcorr(x, y, usevlines=True, maxlags=50, normed=True, lw=2)
\r
14 > ax1.axhline(0, color='black', lw=2)
\r
16 > ax2 = fig.add_subplot(212, sharex=ax1)
\r
17 > ax2.acorr(x, usevlines=True, normed=True, maxlags=50, lw=2)
\r
19 > ax2.axhline(0, color='black', lw=2)
\r
21 > imgdata = io.StringIO()
\r
22 > fig.savefig(imgdata, format='svg')
\r
23 > svg_data = imgdata.getvalue()[0:5]
\r
26 > executePythonStatement code
\r
27 > getPythonStringVariable "svg_data"
\r