Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] Add different line width for each edge #57

Merged
merged 2 commits into from
Jun 13, 2019
Merged

[RFC] Add different line width for each edge #57

merged 2 commits into from
Jun 13, 2019

Conversation

lucianolorenti
Copy link
Contributor

This commit changes how edges are handled. Now every edge is a different series. This is related to #39.

I have doubts about the following comment:

though care must be taken not to screw up the line_z functionality. It's not an easy thing to do :-)

I would like an example to be able to test how behaves with line_z..

This commit changes how edges are handled. Now every edge
is a different serie
@diegozea
Copy link
Collaborator

diegozea commented Jun 3, 2019

I'm not sure. line_z looks to be working with this PR.
@mkborregaard , what do you think?

Whit this PR:

julia> using GraphRecipes

julia> using Plots

julia> a = [ i/j for i in 1:3, j in 1:3]
3×3 Array{Float64,2}:
 0.995027   0.743106   0.703484
 0.360901   0.718034   0.416905
 0.0437366  0.0255265  0.945805

julia> graphplot(a, line_z=vec(a)')

image

Copy link
Member

@mkborregaard mkborregaard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!
@JackDevine it would be great if you could have a look at this, and merge if it doesn't interfere with any of your plans.

Copy link
Member

@JackDevine JackDevine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me!

I wonder if an anonymous function is the best interface for this. In #39 , the OP suggested being able to pass a vector of weights. Personally, I would like graphplot to look at the adjacency matrix and work out the edge weights by itself, so that I don't have to write

graphplot(a, edgewidth=(s,d,w) -> a[s,d])

In any case, the actual visualization part looks really good to me, we can add convenience later.

@JackDevine JackDevine merged commit e3180a8 into JuliaPlots:master Jun 13, 2019
@JackDevine JackDevine mentioned this pull request Jan 4, 2020
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants