The hold on
command prevents the figure from being updated from the regular plot
you did before to semilogy
. To solve this you should close your figure and run the code again.
Note that there is no reason to use hold
commands if you only have one plotting command. The purpose of hold
is to enable several plotting commands to be overlayed in the same figure.