You can set the LineStyle to be 'none' for edges that should not be displayed:
>> g = digraph([3 1 2], [2 3 1], [0 0.5 1]);
>> p = plot(g, 'LineWidth', max(5*g.Edges.Weight, 1));
>> highlight(p, 'Edges', find(g.Edges.Weight == 0), 'LineStyle', 'none');
Unfortunately, EdgeAlpha is a scalar property, which can't be set to different values for each edge.
Alternatively, you could use 'EdgeCData' to represent each edge's value with a different color:
>> plot(g, 'EdgeCData', g.Edges.Weight, 'LineWidth', 3);
>> colorbar
>> colormap(flip(gray))
Here I've set up the color map such that an edge with zero weight is shown as white. As long as the background is white and there aren't too many edges intersecting, this will look the same as if the edge had disappeared.
Best Answer