Question about the comma in palettes setting. #2816
-
Hi all, Sorry for the dumb question, but when I tried to reproduce the results in the document section about palettes, I noticed that when I typed without the last comma as: Axis(f[2, 1],
title = "Custom cycle palette",
palette = (patchcolor = [:red, :green, :blue, :yellow, :orange, :pink])) instead of the original code given in the doc: Axis(f[2, 1],
title = "Custom cycle palette",
palette = (patchcolor = [:red, :green, :blue, :yellow, :orange, :pink],)) It threw an error Can someone please explain to me the usage of the last comma? Thanks a lot! |
Beta Was this translation helpful? Give feedback.
Answered by
SimonDanisch
Mar 28, 2023
Replies: 1 comment 1 reply
-
That's because |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
himcraft
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That's because
(x=2)
is not(; x=2)
or(x=2,)
;) The latter create a named tuple, while the first one just wraps it in brackets ;)