Hold function combining graphs
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
im trying to plot two graphs, and have used two hold functions, yet it is combining all the plots in one single graph. 

0 comentarios
Respuestas (1)
dpb
el 21 de Sept. de 2022
Don't use hold on for separate plots, it's specifically to add more to a given figure/axes.
Insert
figure
instead, before each new plotting sequence where you want a new plot.
2 comentarios
dpb
el 22 de Sept. de 2022
figure by itself creates a new figure...figure(N) either makes the specific figure current if it already exists or makes a new one of the number/handle if it doesn't.
Not much else to understand -- if you want new plots not to overwrite or to add on to the existing then you use figure first. Each figure starts out empty; you then add what is wanted; axes, plot and their compatriots add a single axes to the figure.
Ver también
Categorías
Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!