Shape of lines on a graph plot
Ältere Kommentare anzeigen
Hi, I'm creating a digraph object in a matlab app to show a network of nodes and connecting edges that are generated from pre existing data. The graphs end up looking like this:

What I want to know is whether there is anyway to change the shape of the connecting edges that are displayed for example to reduce the severity of the curve (ideally even to a straight line) or to add arrows to show the direction of each edge. I know the thickness and colour can be changed but this is not helpful for my purposes.
4 Kommentare
dpb
vor 44 Minuten
What is used to generate the attached? For a chance for help, attach a minimum working example that folks can poke at. Paste the code in as text and format with the "CODE" button (or select and use Ctrl-E or Ctrl-E first then paste). If it needs external data, then attach that file.
Timothy
vor etwa 4 Stunden
Of course it matters completely -- what can be modified depends entirely upon what the specific graphics object exposes to the user as settable properties.
If your query here is whether you can control the eccentricity of the ovals in your example, I'd venture the answer will be "No" unless you can get at the underlying object -- which I'll wager is probably going to be hidden.
But, again, give us something to poke at; others may come along that are more familiar than I but why make folks work harder to try to help since it is going to take digging into?
If the above are rendered by using rectangle, the curvature can be modified, but to go through the given points(+) there's only so much that it can do...
subplot(1,3,1)
rectangle('Position',[0 0 2 4],'Curvature',0.2)
axis equal
subplot(1,3,2)
rectangle('Position',[0 0 2 4],'Curvature',0.8)
axis equal
subplot(1,3,3)
rectangle('Position',[0 0 2 4],'Curvature',1)
axis equal
MATLAB doesn't have a builtin circle() or ellipse() function, they're done parametrically which the appearance of the digraph means is probably how it's rendered.
(+) Actually, rectangle can't be what was used here--I'd kinda' forgotten it defines the LLH corner and then width and height, not four corner points.
Timothy
vor 21 Minuten
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu 2-D and 3-D Plots finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



