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

Bug gradient coloring? #5

Open
davide-f opened this issue Mar 5, 2021 · 2 comments
Open

Bug gradient coloring? #5

davide-f opened this issue Mar 5, 2021 · 2 comments

Comments

@davide-f
Copy link
Collaborator

davide-f commented Mar 5, 2021

Dear Developer,
The new update including the compact formulation has improved the quality of the results, however when using the color mode gradient, I experience an unexpected coloring.
I attach an example of the image.
image
Thank you,
Davide

@daschw
Copy link
Owner

daschw commented Mar 6, 2021

Could you provide the code for this example, so I can reproduce and figure out the issue?

@davide-f
Copy link
Collaborator Author

Sorry for the delay, below you can find the example.

data = [1.0  12.0  0.970741
  2.0  11.0  0.099867
  2.0  10.0  0.0874267
 10.0  12.0  0.0233846
  2.0  12.0  0.542539
  1.0  13.0  0.388331
  3.0  11.0  0.0804934
  3.0  10.0  0.110872
 10.0  13.0  0.00206157
  3.0  13.0  0.221796
  1.0  14.0  0.468872
  4.0  11.0  0.185785
  4.0  10.0  0.278111
 10.0  14.0  0.00151853
  4.0  14.0  0.763057
  1.0  15.0  0.353096
  5.0  11.0  0.000423724
  5.0  10.0  0.000141012
 10.0  15.0  0.242061
  5.0  15.0  0.208177
  1.0  16.0  0.970009
  6.0  11.0  0.0001099
  6.0  10.0  3.7705e-5
 10.0  16.0  0.222575
  6.0  16.0  0.208594
  1.0  17.0  0.584011
  7.0  11.0  0.139244
  7.0  10.0  0.189689
 10.0  17.0  0.000833531
  7.0  17.0  0.286463
  1.0  18.0  0.601005
 10.0  18.0  0.278003
  1.0  19.0  0.311745
  8.0  11.0  0.146233
  8.0  10.0  0.252754
 10.0  19.0  0.000103437
  8.0  19.0  0.553732
  1.0  20.0  0.44891
  9.0  11.0  0.127771
  9.0  10.0  0.182001
 10.0  20.0  0.00132186
  9.0  20.0  0.498821
  1.0  21.0  0.519072
 10.0  21.0  0.32917]

tot_colors = vcat(palette(:rainbow)[2], palette(:default)[1:10], palette(:rainbow)[5], palette(:rainbow)[2], palette(:default)[1:10])
sankey(convert(Vector{Int}, data[:, 1]), convert(Vector{Int}, data[:, 2]), data[:, 3];
	node_colors = tot_colors,
        edge_color=:gradient,
        compact=true)

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

No branches or pull requests

2 participants