In [40]:
%reload_ext autoreload
%autoreload 2
%matplotlib inline
import sys
import numpy as np
import matplotlib.pyplot as plt
import plotly.plotly as py
import plotly.graph_objs as go
from plotly import tools

In [41]:
d = []
x = np.array([0.005, 0.010, 0.015, 0.020, 0.025, 0.030])
y = np.array([161.186209, 488.359916, 824.806734, 50.871496, 786.783365, 232.088870]) / 5000
d.append([x, y])
x = np.array([0.0025, 0.005, 0.0075, 0.01, 0.0125, 0.015])
y = np.array([427.175002, 1485.910080, 5000, 959.437183, 30.202512, 87.553069]) / 5000
d.append([x, y])
x = np.array([0.005, 0.010, 0.015, 0.020, 0.025, 0.030])
y = np.array([750.806720, 5000, 5000, 5000, 1588.0265, 66.660807]) / 5000
d.append([x, y])

In [47]:
fig = tools.make_subplots(rows=1, cols=3, subplot_titles=['Australian', 'German', 'Heart'])
for k in range(3):
    x, y = d[k]
    trace = go.Scatter(
        x = x,
        y = y,
        mode = 'lines+markers',
    )
    fig.append_trace(trace, 1, k+1)


fig['layout'].update(height=400, width=1200, title='Effective sample size per sample', showlegend=False)
for k in range(3):
    fig['layout']['xaxis{}'.format(k+1)].update(title='step size')
    fig['layout']['yaxis{}'.format(k+1)].update(title='ESS per sample', range=[0, 1.05])

py.iplot(fig, filename='hmc-lr-ess')
py.image.save_as(fig, filename='hmc-lr-ess.png')


This is the format of your plot grid:
[ (1,1) x1,y1 ]  [ (1,2) x2,y2 ]  [ (1,3) x3,y3 ]


In [ ]: