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

[question] How to control width of visualisation? #66

Open
dselivanov opened this issue Sep 21, 2016 · 6 comments
Open

[question] How to control width of visualisation? #66

dselivanov opened this issue Sep 21, 2016 · 6 comments

Comments

@dselivanov
Copy link
Contributor

I was able to get LDAvis to work with rmarkdown:
See source and corresponding page.
But the page looks a little bit ugly - width of the plot is too high.

Is it possible to adjust width of the plot?

@dselivanov
Copy link
Contributor Author

@cpsievert sorry for bothering you. I'm wondering if there is simple way to do that or not?

@MarcinKosinski
Copy link
Contributor

It can be done in the source code of ldavis.js or you can put ldavis inside iframe and specify width and hight for that iframe

@dselivanov
Copy link
Contributor Author

@MarcinKosinski thx for response. I'm full noob in web dev and js. Can you share some code or point some examples?

@MarcinKosinski
Copy link
Contributor

Is this helpful?
http://stackoverflow.com/questions/25819539/how-to-add-an-interactive-visualization-to-r-markdown
http://bl.ocks.org/ramnathv/raw/8084330/

I googled: including visualization in iframe in r in rmarkdown

@MarcinKosinski
Copy link
Contributor

Talking about random modification of javascript code you should pay attention to lines
https://github.com/cpsievert/LDAvis/blob/master/inst/htmljs/ldavis.js#L39-L53

@dselivanov
Copy link
Contributor Author

dselivanov commented Sep 29, 2016

Talking about random modification of javascript code you should pay attention to lines

I tried to play with these parameters, but without much success.

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