Nesting of tiledlayout objects not possible in R2019b?

15 Ansichten (letzte 30 Tage)
Leon Berger
Leon Berger am 4 Okt. 2023
Bearbeitet: Matt J am 4 Okt. 2023
I need to copy axes from various figures with tiled layouts into one figrue. When reading through some forum Q&As I found that I should be able to nest the tiledlayout objects into one new tiledlayout object. ( see: Nesting tiledlayouts within another tiledlayout - MATLAB Answers - MATLAB Central (mathworks.com); How to copy two figures to a single figure without removing properties of original figures? - MATLAB Answers - MATLAB Central (mathworks.com))
I implemented the solutions into my code and also took some snippets from the accepted answers and run those. Unfortunately, the same error message appeared in all cases: TiledChartLayout cannot be a child of TiledChartLayout.
I also looked into the documentation and found nothing about changes regarding Children and Parents since introduction in R2019b. Due to older simulation models at my workplace I am bound to R2019b.
Is there a solution? Thanks in advance

Akzeptierte Antwort

Stephen23
Stephen23 am 4 Okt. 2023
Bearbeitet: Stephen23 am 4 Okt. 2023
Nesting TiledChartLayout objects was introduced after your version, in R2020a:
"Is there a solution?": You might be able to nest a panel in between, or use SUBPLOT.
Tip: it is worth referring to your installed help (which applies to your installed version) and not to the online help (which applies to the most recent version).

Weitere Antworten (1)

Matt J
Matt J am 4 Okt. 2023
Bearbeitet: Matt J am 4 Okt. 2023
I also looked into the documentation and found nothing about changes regarding Children and Parents since introduction in R2019b.
Seems like it's true. In R2019b, we see
whereas in R2023b, we see
Solution? It depends on what the nesting is meant to accomplish. By allowing plots to overlap multiple tiles, you can give a similar appearance to having nested tiledlayouts.
t=tiledlayout(2,2);
nexttile([1,2])
plot(1:8)
nexttile(3);
plot(1:5)
nexttile(4);
plot(1:7)
  1 Kommentar
Leon Berger
Leon Berger am 4 Okt. 2023
Ok thank you very much. I didn't know about version specific documentation. Sorry

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Produkte


Version

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by