Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open .fig file and delete some of the plot entries-Matlab

I have the following image stored as f7.fig. I want to open it again and delete all the other entries except the first (red), second (blue) and last(cyan). I want also to delete them from the legend. Is this possible?

enter image description here


1 Answers

An easy interactive approach would be like this:

savefig(h, 'somefig.fig`); % Save figure
% Close the figure ...
openfig('somefig.fig'); % Open figure
% Click on the curves you wanted to delete ....
delete(gco); % delete object -> this takes care of the legend too
% Click on the curves you wanted to delete ....
delete(gco); 
% so on...

This approach here is also an alternative.

like image 170
If_You_Say_So Avatar answered Dec 20 '25 08:12

If_You_Say_So



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!