Borrar filtros
Borrar filtros

biograph node sizes

3 visualizaciones (últimos 30 días)
Amir Nahir
Amir Nahir el 2 de Mayo de 2011
Editada: Elizabeth Drybrugh el 24 de Mayo de 2018
Hi, I've been trying to draw something using biograph. The nodes come out pretty big, and I tried controlling them with the Size attirbute, but: either the node size updates, and the edges seem "hanging", or I re-do 'dolayout' for the edges, and the node size resets. Here's an example of something I tried:
cm = [ 1 0 0 0 0 1 1 0; 1 1 1 0 0 0 0 0; 1 1 1 0 0 0 0 0; 0 0 1 1 1 0 0 0; 0 0 1 1 1 0 0 0; 1 0 0 0 1 1 0 0; 0 0 1 0 0 0 1 1; 0 0 1 0 0 0 1 1;];
bg = biograph(cm);
dolayout(bg)
bg.nodes(1).Position = [11 1];
bg.nodes(1).Shape = 'circle';
bg.nodes(1).Size = [2 2];
bg.nodes(2).Position = [8 6];
bg.nodes(2).Shape = 'circle';
bg.nodes(2).Size = [2 2];
bg.nodes(3).Position = [9 6];
bg.nodes(3).Shape = 'circle';
bg.nodes(3).Size = [2 2];
bg.nodes(4).Position = [17 6];
bg.nodes(4).Shape = 'circle';
bg.nodes(4).Size = [2 2];
bg.nodes(5).Position = [18 4];
bg.nodes(5).Shape = 'circle';
bg.nodes(5).Size = [2 2];
bg.nodes(6).Position = [16 2];
bg.nodes(6).Shape = 'circle';
bg.nodes(6).Size = [2 2];
bg.nodes(7).Position = [12 17];
bg.nodes(7).Shape = 'circle';
bg.nodes(7).Size = [2 2];
bg.nodes(8).Position = [13 17];
bg.nodes(8).Shape = 'circle';
bg.nodes(8).Size = [2 2];
dolayout(bg, 'Pathsonly', true);
dolayout(bg, 'Sizeonly', true);
view(bg)
Thanks!
Amir
  1 comentario
Amir Nahir
Amir Nahir el 2 de Mayo de 2011
of course, the command before last is illegal 'Sizeonly'... just desparate attempts...

Iniciar sesión para comentar.

Respuestas (1)

Elizabeth Drybrugh
Elizabeth Drybrugh el 23 de Feb. de 2018
Editada: Elizabeth Drybrugh el 24 de Mayo de 2018
Hey I hope you have fixed it by now if not then create variable
vg = view(bg)
Make sure the biograph GUI is kept open then you can modify properties E.g.
vg.nodes(1).size = [50 50]
I have attached an example with 12 nodes to let you see.

Categorías

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

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by