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

How would I plot the intertopic distance in ggplot? #102

Open
norseghost opened this issue Sep 12, 2020 · 1 comment
Open

How would I plot the intertopic distance in ggplot? #102

norseghost opened this issue Sep 12, 2020 · 1 comment

Comments

@norseghost
Copy link

Well, the title says it all. I find the intertopic distance map quite useful in demonstrating how diverse (or not) a set of documents may be; but I'd quite like to run it through ggplot.

Any pointers? If all else fails, I can screenshot the plot and include it that way; but eeew :)

@Matt-Int
Copy link

Not sure if this is still relevant but I found that you can access the plotting data through the json. Something like this worked for me:

json_obj <- jsonlite::fromJSON(json) # where json is the output from LDAvis::createJSON
mds_data <- as_tibble(json_obj$mdsDat) # can also use a data.frame
ggplot(mds_data, aes(x, y)) + geom_point()

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