How to combine two plots into one with separate markers (2024)

How to combine two plots into one with separate markers (1)

Mischa Kim on 23 Jul 2014

Edited: Mischa Kim on 23 Jul 2014

Jimmy, as a very efficient approach (if you only need to do it once) I recommend 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

How to combine two plots into one with separate markers (2)

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));

For n figures you would simply use a for-loop to copy all objects.

8 Comments

Show 6 older commentsHide 6 older comments

How to combine two plots into one with separate markers (3)

Vaultec on 23 Jul 2014

how would i go about setting them to separate markers automatically?, sorry a bit new to matlab so I'm not quite sure how to do that and write a for loop

How to combine two plots into one with separate markers (7)

Joel Fernandez on 7 Apr 2020

thank you! it works for 2 .fig files

could you please show us how it should be for 3 .fig files? ... then I will do the for-loop for n figures by myself (promise)

Sign in to comment.

How to combine two plots into one with separate markers (2024)
Top Articles
Latest Posts
Article information

Author: Gregorio Kreiger

Last Updated:

Views: 5979

Rating: 4.7 / 5 (77 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Gregorio Kreiger

Birthday: 1994-12-18

Address: 89212 Tracey Ramp, Sunside, MT 08453-0951

Phone: +9014805370218

Job: Customer Designer

Hobby: Mountain biking, Orienteering, Hiking, Sewing, Backpacking, Mushroom hunting, Backpacking

Introduction: My name is Gregorio Kreiger, I am a tender, brainy, enthusiastic, combative, agreeable, gentle, gentle person who loves writing and wants to share my knowledge and understanding with you.