creating graph with table

I have a table with muliple data but different sizes such as data1 in the table has 3 columns and data 2 in the table has 4 columns. I want to graph a tree-like plot. For instance lets say i have values of 1 2 3 in data1 and values of 4 5 6 7 in data2. I want to plot a graph which shows 1 2 3 connected to 4 5 6 7 like a tree. how can i achieve this?

回答 (1 件)

Vimal Rathod
Vimal Rathod 2020 年 12 月 3 日

0 投票

Hi,
You could use the function called digraph to create a directed graph assinging vertices in hierarchy. Then you could use plot function to plot the graph.
Refer to the following link to know more about digraph function and also have a look at the examples in the documentation.
To know more about plot function you could refer to the following link.

カテゴリ

ヘルプ センター および File ExchangeDiscrete Data Plots についてさらに検索

質問済み:

2020 年 12 月 1 日

回答済み:

2020 年 12 月 3 日

Community Treasure Hunt

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

Start Hunting!

Translated by