sushmita_goel22 asked . 19/08/2019

How can I merge two .fig into one .fig?

How can I merge two .fig into one .fig?

Matlab

Expert Answer

Kshitij Singh ( Staff ) answered . 20/08/2019


A simple copy-paste:

  1. Open both figures

  2. Select "Show Plot Tools and Dock Figure" in both figures (see figure below)

  3. Select one of the plot lines and copy [CTRL+C]

  4. Paste [CTRL+V] in the other plot

  5. Change the line properties to your liking
Of course, you could use the programmatic approach, e.g., say you have to figures, one line plot each:
fh1 = open('f1.fig'); fh2 = open('f2.fig'); ax1 = get(fh1, 'Children'); ax2 = get(fh2, 'Children'); ax2p = get(ax2(1),'Children'); copyobj(ax2p, ax1(1));