×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Copying a figure and everything on it

Copying a figure and everything on it

Copying a figure and everything on it

(OP)
I am creating a GUI that processes some data and plots the data on a figure.  The little plot window in my GUI is nice, but I'd like to be able to give the user the option to copy the figure to an external figure window, so that they can then do things like saving the figure as a JPG or something like that.  That way I don't have to incorporate all these things into my GUI.

I know that I can create a new figure by using the command:

figure;

but how do I get everything off my old figure onto the new one?

RE: Copying a figure and everything on it

The copyobj function will do the trick.

RE: Copying a figure and everything on it

(OP)
copyobj does not copy figures, or axes, as far as I can tell.  It copies things like plots I think.

I want to be able to copy EVERYTHING on a figure into another figure.

thanks

RE: Copying a figure and everything on it

It does copy EVERYTHING. You just need to make sure you have a handle to the things you want to copy.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources