if(nbBins>1000){// Add a warning if there are more than 1000 bins
if(nbBins>max_plotted_bins){// Add a warning if there are more than max_plotted_bins bins
GLMessageBox::Display("For performance reasons only the first 1000 bins will be plotted.\n"
GLMessageBox::Display(fmt::format("For performance reasons only the first {} bins will be plotted.\n"
"You can still get the data for all the bins by using the Copy all data button.","More than 1000 bins",{"OK"},GLDLG_ICONWARNING);
"You can still get the data for all the bins by using the Copy all data button.",max_plotted_bins),fmt::format("More than {} bins",max_plotted_bins),{"OK"},GLDLG_ICONWARNING);