How to insert shapes in Report Generator? I want to create a tree like structure and block diagram. How do I write code for drawing that?

2 views (last 30 days)
Hi, I want to insert shapes to make a tree like diagram or structure in my report. Is there any way to draw? How do write code for that?
Is there any API available for Report Generation as it is there for tables, images, etc?
It would be great even if you suggest any alternative. Thank you.

Answers (1)

Kausthub
Kausthub on 11 Oct 2023
Hi Srushti Khatau,
I understand that you would like to create shapes in MATLAB Report Generator to make tree-like diagrams.
Unfortunately, there are no built-in APIs available to create shapes in MATLAB Report Generator, but there are APIs to add figures and images. A possible workaround would be to create an image or figure of the tree diagram and place it in the report.
You could create the tree diagram using “digraph” or treeplot” functions.
Later you can incorporate the tree diagram into the report using the “Image” or “Figure” functions.
Also, I have attached the script - “createShapes.m” - containing the workaround. You could refer to this for more clarity.
Hope this helps and solves your query regarding inserting shapes to create a tree like diagram using MATLAB Report Generator!

Categories

Find more on MATLAB Report Generator in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!