How to change the order of lines in a Matlab figure?

后端 未结 4 965
旧巷少年郎
旧巷少年郎 2020-12-08 13:55

Given a plot of three curves in a .fig file I\'d like to add another plot (with hold all and plot), but put it behind one of the already e

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-08 14:41

    When the image has a legend, the get(gca,...) and set(gca,...) pair result in an error: "Error using set. Children may only be set to a permutation of itself" In that case, I used the GUI select tool of the figure to select the axes objects, then get and set work only with the plots as required and not the legend as well. After calling set, you have to refresh the legend by calling legend(...). I had 5 plots that I needed to reorder. When unsure about the order, permute plots two at a time, refresh the legend and see if that is the order you wanted

提交回复
热议问题