1
$\begingroup$

I have a graph with over 2000 vertices, and I would like to change the size of around 25 of them. I know that I can specify the size of each of them individually, but I would like to be more efficient. I want something like the following to work, but it doesn't ... VertexSize -> {{1, 22, 53, 84, 105} -> 6} (Note that this example would like to make vertices 1, 22, 53, 84, 105 a size of 6.) Any thoughts?

$\endgroup$
2
  • 1
    $\begingroup$ Please include a sample of your data and full code for what you have tried so far. $\endgroup$
    – MarcoB
    Jul 27, 2022 at 19:54
  • $\begingroup$ try VertexSize -> {Alternatives@@{1, 22, 53, 84, 105} -> 6}? $\endgroup$
    – kglr
    Jul 27, 2022 at 21:55

1 Answer 1

4
$\begingroup$

Use Thread.

Thread[{1, 22, 53, 84, 105} -> 6]
(* {1 -> 6, 22 -> 6, 53 -> 6, 84 -> 6, 105 -> 6} *)
$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.