You can use the saveas command to save your figure to a specific file format.
h = figure;
plot(X, y, '-bs', 'Linewidth', 1.4, 'Markersize', 10);
This way, the figure is plotted, and automatically saved to the desired file format.
Alternatively you can wait for the plot to appear and click 'save as' in the menu.