How can I force a plot of phylogenetic tree to appear as subplot and not as a new figure?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Dina Berenbaum
am 20 Mär. 2018
Kommentiert: Dina Berenbaum
am 21 Mär. 2018
I want to add a phylogenetic tree I created to already existing figure as a subplot. However, this doesn't work and it keeps on opening a new figure. Any suggestions? Thank you.
f = figure('units','normalized','outerposition',[0 0 1 1]);
subplot(2,1,1)
plot(x,y)
spd = seqpdist(seqs);
PhyloTree = seqlinkage(spd);
subplot(2,1,2)
plot(PhyloTree)
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 20 Mär. 2018
Unfortunately the code is hard-wired to create a new figure.
You can assign the output of plot() to a variable and then you can use findobj() or get the children of the returned figure to find the axes, and then you can move the contents of the axes and copy its various settings (except OuterPosition) to the existing axes. However, the plot() call also attaches some information as appdata to the figure, so you might not get correct behavior of the moved information.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Subplots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!