Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 4419664f authored by Jérôme Euzenat's avatar Jérôme Euzenat
Browse files

Further improved plot display in plotreing

parent 2df6b8a3
No related branches found
No related tags found
No related merge requests found
......@@ -161,31 +161,22 @@ def plot_average_curve( alldata, indexes, ylabel, xlabel, xmax, ymax, col, ops,
plt.gca().set_prop_cycle(None)
ind = 0
for op in ops:
#display(op)
#add 100 points to plot on intervals of 100
#print(alldata[index][ind].iloc[1::100])
alldata[index][ind].iloc[1::100].plot(kind='line',y=col, label=op, ax=ax, linestyle=ls, linewidth=1.0, legend=legend) #, marker='*', color='blue'
ind += 1
ax.set_xlabel(xlabel) # Add an x-label to the axes.
ax.set_xlim([0,xmax])
ax.set_ylabel(ylabel) # Add a y-label to the axes.
ax.set_ylim([0,ymax])
#ax.set_ylim([0,100])
ax.spines['top'].set_visible(False) # suppress top and right bars
ax.spines['right'].set_visible(False)
#
#ax.set_title(label+" for "+pattern) # Add a title to the axes.
#ax.set_title(ylabel) # Add a title to the axes.
#ax.legend(loc='center', bbox_to_anchor=(0.5, -0.05), shadow=True, ncol=2) # Add a legend.
#ax.legend() # ncol=2
if legend == True:
lines = ax.get_lines()
ax.legend( handles=lines[:ind], loc='lower center', bbox_to_anchor=(0.5, 1.05), ncol=3 ) # ncol=2
#
ax.legend( loc='lower center', bbox_to_anchor=(0.5, 1.05), ncol= )
plt.show()
# JE 2023: That would be far better to have simple notations
#dict_ops = {'Size':['Size','size'],'size':['Size','size'],'Success\\ rate':['Succes rate','srate'],'Success~rate':['Succes rate','srate'],'Success$~$rate':['Succes rate','srate'],'Success':['Succes rate','srate'],'F$-$measure':['F-measure','fmeas'],'Prec':['Precision','prec'],'Precicion':['Precision','prec'],'Precision':['Precision','prec'],'Rec':['Recall','rec'],'Recall':['Recall','rec']}
dict_ops = {'size':['Size','size'],'successrate':['Succes rate','srate'],'f-measure':['F-measure','fmeas'],'precision':['Precision','prec'],'recall':['Recall','rec']}
dict_ops = {'size':['Size','size'],'successrate':['Success rate','srate'],'f-measure':['F-measure','fmeas'],'precision':['Precision','prec'],'recall':['Recall','rec']}
def print_datafiles( alldf, plotinfo, labelpatts, cols, nbiter ):
[plotlabel,col] = dict_ops[plotinfo[0]]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment