I am using python ggplot, but for some reason when the plot is done I don't see the legends
df = pd.DataFrame({"at_k": at_k, "ndcg": mean_ndcg, "ndcg_non_bucket": mean_ndcg_non_bucket, "apk": mean_apk})
df2 = pd.melt(df[['at_k', 'ndcg', 'ndcg_non_bucket', 'apk']], id_vars=['at_k'])
print ggplot(aes(x='at_k', y='value', group='variable', shape='variable', colour='variable'), data=df2) +\
geom_line() + geom_point()
I thought by default it should show the legend.
Check if you have the latest commit of ggplot
pip install git+git://github.com/yhat/ggplot.git
(And you may have to run that code with sudo in front). If it sill can't work, try to update matplotlib and ipython to the latest versions. I am using matplotlib 1.4.3 and ipython 2.4.1 It is working well for me.