JuliaPlots / GraphRecipes.jl

Graph-related recipes to be used with Plots.jl
Other
164 stars 27 forks source link

Edges doesn't look nice now #52

Open diegozea opened 5 years ago

diegozea commented 5 years ago
using PlotRecipes
using Plots

const n = 15
const A = Float64[ rand() < 0.5 ? 0 : rand() for i=1:n, j=1:n]
for i=1:n
   A[i, 1:i-1] = A[1:i-1, i]
end

plot(graphplot(A, line = (3, 0.5, :blues)), graphplot(A, line = (3, 0.5, :blue)), size=(600,300))

image

Maybe this change is related to: https://github.com/JuliaPlots/Plots.jl/pull/1467

JackDevine commented 4 years ago

@diegozea do you still think that this is a problem? If so, it would be nice to have some concrete targets that need to be met in order to close this.

diegozea commented 4 years ago

It looks like there is now a problem with that way of defining line colours:

julia> graphplot(A, line = (3, 0.5, :blues))                                                                            
Error showing value of type Plots.Plot{Plots.GRBackend}:                                                                
ERROR: MethodError: no method matching iterate(::RGBA{Float64})                                                         
Closest candidates are:                                                                                                   
iterate(::Core.SimpleVector) at essentials.jl:604                                                                       
iterate(::Core.SimpleVector, ::Any) at essentials.jl:604                                                                
iterate(::ExponentialBackOff) at error.jl:214
JackDevine commented 4 years ago

I will put it on my todo list. Besides the error, do you think that the aesthetics of edges are OK?