Contributing to #238 (closed). Implemented error handling in stats function. A threshold has been set for the maximum size of the plot that depends on the number of jobs, resulting in that there should not be more than 20 plots per figure. Usually, with around 30 plots the system cannot allocate enough memory, so 20 has been selected as a safe number to avoid this error.
The error handling informs the user of the reason for the error and gives further instructions on how to avoid it.