def _plot(results, metrics, formats, title, x_ticks, x_label, format_markers=('x', '|', 'o', '+'), metric_colors=('c', 'm', 'y', 'k', 'g', 'r', 'b')):
 fig = plt.figure('scikit-learn multilabel metrics benchmarks')
 plt.title(title)
 ax = fig.add_subplot(111)
 for (i, metric) in enumerate(metrics):
  for (j, format) in enumerate(formats):
   ax.plot(x_ticks, results[(i, j)].flat, label='{}, {}'.format(metric, format), marker=format_markers[j], color=metric_colors[(i % len(metric_colors))])
 ax.set_xlabel(x_label)
 ax.set_ylabel('Time (s)')
 ax.legend()
 plt.show()

def _plot ( results , metrics , formats , title , x_ticks , x_label , format_markers = ( 'x' , '|' , 'o' , '+' ) , metric_colors = ( 'c' , 'm' , 'y' , 'k' , 'g' , 'r' , 'b' ) ) : fig = plt . figure ( 'scikit-learn multilabel metrics benchmarks' ) plt . title ( title ) ax = fig . add_subplot ( 111 ) for ( i , metric ) in enumerate ( metrics ) : for ( j , format ) in enumerate ( formats ) : ax . plot ( x_ticks , results [ ( i , j ) ] . flat , label = '{}, {}' . format ( metric , format ) , marker = format_markers [ j ] , color = metric_colors [ ( i % len ( metric_colors ) ) ] ) ax . set_xlabel ( x_label ) ax . set_ylabel ( 'Time (s)' ) ax . legend ( ) plt . show ( )
plot the results by metric .