Borrar filtros
Borrar filtros

How to plot this picture use matlab?

1 visualización (últimos 30 días)
z cy
z cy el 20 de Mayo de 2020
Comentada: z cy el 23 de Mayo de 2020

Respuesta aceptada

Steven Lord
Steven Lord el 21 de Mayo de 2020
On the documentation page for the plot method of graph objects see the "Custom Graph Node Coordinates" example for how to plot nodes of your graph in specific locations.
The documentation page describing various types of customization you can do to a plotted graph may also be of use to you.

Más respuestas (1)

Ameer Hamza
Ameer Hamza el 20 de Mayo de 2020
Try this code
s = randi([1 100], 1, 2000);
t = randi([1 100], 1, 2000);
G = graph(s, t);
p = plot(G, 'Layout', 'subspace');
p.NodeLabel = [];
p.MarkerSize = 10;
p.NodeCData = 1:100;
p.EdgeColor = [0.5 0.5 0.5];
colormap(autumn)
colorbar
  5 comentarios
Ameer Hamza
Ameer Hamza el 21 de Mayo de 2020
Editada: Ameer Hamza el 21 de Mayo de 2020
Do you have the code to create the adjacency matrix? Also, do you want to use custom coordinates for the node position?
z cy
z cy el 23 de Mayo de 2020
yes. Thank you!

Iniciar sesión para comentar.

Categorías

Más información sobre Networks en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by