GraphRecipes.jl icon indicating copy to clipboard operation
GraphRecipes.jl copied to clipboard

Get rid of, or set colors of, small dots within vertices

Open TorkelE opened this issue 3 years ago • 7 comments

I am plotting a graph, but there are some weird squares in the middle of each vertex. This causes problems as the colour of these dots cannot be controlled, and for large these dots take up a lot of space, preventing me from colouring the graph properly. Here's an example:

using GraphRecipes, Graphs, Plots
n = 15;
lattice = Graphs.SimpleGraphs.grid([n,n])
xs = vcat(fill(1:n,n)...)
ys = vcat(map(i->fill(i,n), 1:n)...)
colors = [fill(:red,125);fill(:blue,100)];
graphplot(lattice;x=xs,y=ys,nodecolor=colors,nodeshape=:rect,nodesize=4.2,linealpha=0.0,size=(1000,1000))

image

here all of the dots in the middle are blue. In this case the overall picture is the same, but here I have an example where the entire plot becomes a single colour: image (The yellow squares fill up almost the entire nodes)

Is there a way to (preferably) remove these dots, or at least designate them colours identical to the underlying vertex?

TorkelE avatar Oct 14 '22 15:10 TorkelE

Can you try https://github.com/JuliaPlots/GraphRecipes.jl/issues/154#issuecomment-1081248382 ?

Maybe related to https://github.com/JuliaPlots/GraphRecipes.jl/issues/175 or https://github.com/JuliaPlots/GraphRecipes.jl/issues/154.

t-bltg avatar Oct 14 '22 15:10 t-bltg

Some progress, using markerstrokewidth=0 does eliminate the black border around the central square, but the square remains: image

TorkelE avatar Oct 14 '22 15:10 TorkelE

Try to play with https://docs.juliaplots.org/stable/generated/attributes_series/.

A PR to set markerstrokewidth=0, and other potential fixes would be appreciated.

t-bltg avatar Oct 14 '22 15:10 t-bltg

Sorry, tried to play around with what was there, but both the large and small things seem to be nodes in some way. What I have discovered is that while the big squares take the colors I provide, the small one always take the color of the last element in the nodecolor vector. I had a code at looking at the code, but didn't really get anywhere at all.

TorkelE avatar Oct 15 '22 09:10 TorkelE

Is there any advances on this issue?

gabrevaya avatar Nov 16 '22 14:11 gabrevaya

Is there any advances on this issue?

No, it's still there.

dsryu0822 avatar Nov 22 '23 09:11 dsryu0822

Are there any updates on this issue? It's making the package unusable because my labels are barely readable now. :-(

jsimons8 avatar Feb 02 '24 16:02 jsimons8

Should be solved by #199

BeastyBlacksmith avatar May 16 '24 09:05 BeastyBlacksmith