Ratings for top captionsΒΆ

[1]:
import pandas as pd
import matplotlib.pyplot as plt
plt.style.use('ggplot')
[4]:
import caption_contest_data as ccd
[9]:
def get_score_plot(contest, N=100):
    df = ccd.summary(contest)
    scores = df.score
    fig, ax = plt.subplots()
    df.plot(x='rank', y='score', yerr='precision', style='_', ax=ax)
    ax.set_xlim(0, N)
    ax.set_ylim(scores[N], scores[0] + 0.05)
    ax.set_title(f'Cartoon caption contest {contest}')
    ax.set_ylabel('Average score')
    ax.set_xlabel('Rank')
    return fig
[10]:
import matplotlib.pyplot as plt
import numpy as np

fig = get_score_plot(586)
../_images/example-analyses_Ratings-for-top-captions_4_0.png
[11]:
fig = get_score_plot(587)
../_images/example-analyses_Ratings-for-top-captions_5_0.png
[12]:
fig = get_score_plot(634)
../_images/example-analyses_Ratings-for-top-captions_6_0.png
[13]:
fig = get_score_plot(635)
../_images/example-analyses_Ratings-for-top-captions_7_0.png
[14]:
fig = get_score_plot(640)
../_images/example-analyses_Ratings-for-top-captions_8_0.png
[15]:
fig = get_score_plot(652)
../_images/example-analyses_Ratings-for-top-captions_9_0.png
[ ]: