Open SimonEnsemble opened 2 years ago
This will get fixed in: https://github.com/JuliaGraphs/GraphPlot.jl/pull/176
@SimonEnsemble , Since PR #176 hasn't been reviewed. You can accomplish this with GraphMakie:
using Graphs, GraphMakie, GLMakie, LaTeXStrings
g=SimpleGraph(Edge.([(1,2),(1,3),(3,4),(3,5),(4,5)]))
graphplot(g,
node_size=40,
node_color=:white,
node_attr=(strokecolor=:black, strokewidth=5),
nlabels=[L"v_%$i" for i in vertices(g)], #use latex for labels
nlabels_align=(:center,:center),
edge_attr=(linestyle=[e==Edge(1,3) ? :dash : :solid for e in edges(g)],), #set dashed edge for 1-3 edge
edge_plottype=:beziersegments #lets you set edge specific properties
)
You'll get the following plot:
would be cool to be able to change the edge strokes as dashed, dotted, etc. to denote different classes of edges. e.g. I want to illustrate that there is not a path between v_1 and v_3. would be cool to be able to connect v_1 and v_3 with a dashed edge line. (I know you can adjust edge colors, but edge stroke would be great too.)