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

Label ordel #20

Open
brunaw opened this issue Apr 23, 2018 · 1 comment
Open

Label ordel #20

brunaw opened this issue Apr 23, 2018 · 1 comment

Comments

@brunaw
Copy link

brunaw commented Apr 23, 2018

Hello!

Is there anyway I can reoder the labels?
I noticed their appear in an alphabetical form, but for my case it would make more sense
if the labels could be arranged in a specific way.

Thanks in advance.

@mattflor
Copy link
Owner

mattflor commented Apr 24, 2018

Do they? I don't think so. The order is determined by the matrix you pass to the chorddiag function (if I remember correctly).

See e.g.:

m <- matrix(500*seq.int(1, 16, by = 1),
            byrow = TRUE,
            nrow = 4, ncol = 4)
haircolors <- c("blonde", "red", "brown", "black")
dimnames(m) <- list(have = haircolors,
                    prefer = haircolors)
print(m)

groupColors <- c("#FFDD89", "#F26223", "#957244", "#000000")
chorddiag(m, groupColors = groupColors, groupnamePadding = 20,
          tickInterval = 500)

Groups start at the 12 o'clock position and then are placed clockwise...

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

No branches or pull requests

2 participants