Fixed a bug when RAW function is tryied to plot after a clearraw.
(Improvement: the check is only on function str = "RAW" it is possible to check if the function is valid)
Managed the nan value in the plot (to be reviewed)
Fix. When function str is changed the RAW data is cleared.