JuliaGraphs / JuliaGraphs/GraphPlot.jl
Plotting mixed graphs
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 213
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
Hi!
I am fairly new to Julia but I am amazed and I started using GraphPlot. I have an idea for improvement and I would also really like to contribute with this via a PR.
However, since I am quite new to github also, I want to discuss my idea with you before going into action (and start learning how to use github properly regarding PRs meanwhile).
Mixed graphs:
It could be nice if GraphPlot could do mixed graphs too.
I think a simple and fine implementation could be via an individual mapping of the edges. In a lot of plotting cases, you have already done your mapping.
The origin of this issue, e.g., was that I wanted to plot the optimization of a transport model. I had all the flows in the graph mapped to an edge color corresponding to a flow/capacity-ratio:

Here, it could just be nice to write something like:
gplot(g,arrowlengthfrac=[abs(flow[i]) > 0 ? 0.1 : 0 for i in 1:num_of_edges])
And thereby avoiding the arrows of all the grey edges, which just disturbs the image.
I have looked into plot.jl and lines.jl, and it seems doable without too much effort and without mess up the control flow of the code.
Perspectives:
I have the impression that GraphPlot is built around LightGraphs and MixedGraph() is not yet a method. But preparing for a graph tool, in the case of a future MixedGraph() method, could be nice either way.
What do you think?
Do you find any immediate issues or should I try to start making it work?
All the best,
Benjamin
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/plot.jl and src/lines.jl, especially the gplot entry point and existing edge-mapping options. Review how arrow rendering is controlled, then determine how per-edge arrow lengths could support the proposed mixed-graph visualization without disrupting current behavior. Done should include a documented approach and tests or examples covering edges with and without arrows.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100