A figure file is saved. When several lines are intersected, I want to make one of the line visible. How should I modify the different layer of the lines without re-plotting the figure?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use
uistack(see doc). For example, after:the red line is on top (and the blue line would not be seen if the the red line covered it). Then, if you use
uistack(hblue,'top'), the blue line is brought to the top. Other options to reorder plots, instead oftop, areup,down, andbottom. You can optionally specify the number of stepsupordown(e.g.uistack(h,'up',2)to move a handle two layers up – though no need in my simple example).If, as you say, the ‘figure file is saved’, and you don’t have the handles for the plots, (
hblueandhredin my example), after loading the plot, you can get the handles usingget(gca,'children').