{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "%pylab inline"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 1
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "results = {",
      {% for ir in result.iteration_results -%}
        {% for metric in ir.metrics -%}
          {% if metric.name in ir.workload.summary_metrics or not ir.workload.summary_metrics -%}
      "\"{{ ir.spec.label }}_{{ ir.id }}_{{ ir.iteration }}_{{ metric.name }}\": {{ metric.value }}, ",
          {%- endif %}
        {%- endfor %}
      {%- endfor %}
      "}\n",
      "width = 0.7\n",
      "ind = np.arange(len(results))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 2
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "fig, ax = plt.subplots()\n",
      "ax.bar(ind, results.values(), width)\n",
      "ax.set_xticks(ind + width/2)\n",
      "_ = ax.set_xticklabels(results.keys())"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 3
    }
   ],
   "metadata": {}
  }
 ]
}
