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

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

Closed
TorkelE opened this issue Oct 14, 2022 · 8 comments
Closed

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

TorkelE opened this issue Oct 14, 2022 · 8 comments

Comments

@TorkelE
Copy link

TorkelE commented Oct 14, 2022

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?

@t-bltg
Copy link
Member

t-bltg commented Oct 14, 2022

Can you try #154 (comment) ?

Maybe related to #175 or #154.

@TorkelE
Copy link
Author

TorkelE commented Oct 14, 2022

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

@t-bltg
Copy link
Member

t-bltg commented Oct 14, 2022

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.

@TorkelE
Copy link
Author

TorkelE commented Oct 15, 2022

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.

@gabrevaya
Copy link

Is there any advances on this issue?

@dsryu0822
Copy link

dsryu0822 commented Nov 22, 2023

Is there any advances on this issue?

No, it's still there.

@jsimons8
Copy link

jsimons8 commented Feb 2, 2024

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

@BeastyBlacksmith
Copy link
Member

Should be solved by #199

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants