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

bug (?) missing words #8

Closed
ignacio82 opened this issue Aug 28, 2015 · 7 comments
Closed

bug (?) missing words #8

ignacio82 opened this issue Aug 28, 2015 · 7 comments
Labels

Comments

@ignacio82
Copy link

In this simple example only 1 of the 3 'words' is plotted.

words <-
  structure(c(223L, 193L, 146L), .Dim = 3L, .Dimnames = structure(list(
    c(
      "CERTIFIED SERVICE MANAGER (CSM)", "CISCO CERTIFIED NETWORK ASSOCIATE",
      "CISCO CERTIFIED NETWORK PROFESSIONAL (CCNP)"
    )
  ), .Names = ""))

library("d3wordcloud")
set.seed(8297)   
d3wordcloud(words= names(words), freqs = as.numeric(words), font = 'impact')

wordcloud plots the 3:

library(wordcloud)
wordcloud(names(words),as.numeric(words), scale = c(1.5, 0.25))

Thanks!

@jbkunst
Copy link
Owner

jbkunst commented Aug 28, 2015

Mmm.. I think your 'words' are too long ;). I'm don't know a quick way to fix this because I only use the https://github.com/jasondavies/d3-cloud library and I am not a d3js expert. I don't think this is a bug, may be a extreme/rare case where wordcloud dont fit in the needs.

I will think about this, if I can do something I let you know.

By the way, I tried use the wordcloud package and it says:

wordcloud(names(words),as.numeric(words), scale = c(1.5, 0.25))
Warning messages:
1: In wordcloud(names(words), as.numeric(words), scale = c(1.5, 0.25)) :
CISCO CERTIFIED NETWORK ASSOCIATE could not be fit on page. It will not be plotted.
2: In wordcloud(names(words), as.numeric(words), scale = c(1.5, 0.25)) :
CERTIFIED SERVICE MANAGER (CSM) could not be fit on page. It will not be plotted.
3: In wordcloud(names(words), as.numeric(words), scale = c(1.5, 0.25)) :
CISCO CERTIFIED NETWORK PROFESSIONAL (CCNP) could not be fit on page. It will not be plotted.

@ignacio82
Copy link
Author

@jbkunst Thanks! The wordcloud package works fine for me. My guess is that your screen has a lower resolution than mine (or something like that)

@jbkunst
Copy link
Owner

jbkunst commented Aug 28, 2015

@ignacio82 sure, this must be it.

@jbkunst jbkunst closed this as completed Nov 30, 2015
@ignacio82
Copy link
Author

is there a bug fix? I just tried and I get the same behavior.

@jbkunst
Copy link
Owner

jbkunst commented Nov 30, 2015

Oops, Not yet.

I'm just noticed the discuss on jasondavies/d3-cloud#36. I dont know if the solutions presented in that issue are easy to implement. I'll check, so if there are an easy one I'll implement in other case we close the issue.

@jbkunst jbkunst reopened this Nov 30, 2015
jbkunst added a commit that referenced this issue Dec 4, 2015
@jbkunst
Copy link
Owner

jbkunst commented Dec 4, 2015

@ignacio82

Ok, the simple solution I found it was add a resize parameter. Check here.

Tell me if it helps.

@ignacio82
Copy link
Author

@jbkunst looks great! Thanks!

@jbkunst jbkunst closed this as completed Dec 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants