Note: when executing your example code, matlab gives me a warning, probably because the second line overwrites win as defined in the first line. ![]() The piece of code that works on the first figure but not for the second is: (By the way I am using Matlab 2013b, so not every function is available for me. I am a bit puzzled why your example does not work as expected, but changing hold on to hold(win.sub2, 'on') seems to produce the desired result. Eventually I tried to create the new figure with the exact same graphs and properties, the issue persists. Multiple plotting in matlab is part of MATLAB course video series. I researched about this issue and it is mentioned that "SUBPLOT clears the axes when called unless the new subplot properties (such as 'position') match the original subplot properties". How to Plot multiple graphs in matlab using subplot command and hold on command. ![]() Basically "hold on" does not work even I did everything the same as I did for the other figures. Actually all the settings are going away (title, axes names, etc.) and the new graphs are added on a blank subplot. I execute HOLD ON before making changes to the subplots, however the plot on one of the axes gets removed when I make changes. The steps for multiple plotting of the data using subplot statement:- Step 1: Take the required signals. Step 2: Then we use to hold on to plot the 2 nd signal on the same axes but different colour or style. For the figures sized 4x2 I do not have any issues but for the figure sized 6x2, whenever I try to add another graph, the existing one goes away. The steps for multiple plotting of the data using subplot statement:- Step 1: We take variables and assign a value and plot 1 st signal. The thing is, I need to use those saved figures again and add other plots without deleting the existing ones (directly on existing data, imagine you have a sine wave on plot 4,2,1 and then you are adding a cosine wave now you have 2 waves inside this plot). I had created 3 figures consisting of subplots: 4x2 6x2 and 4x2 and saved them in 3 seperate.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |