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

Can't change figure size in R markdown #455

Open
nickschurch opened this issue Feb 3, 2023 · 1 comment
Open

Can't change figure size in R markdown #455

nickschurch opened this issue Feb 3, 2023 · 1 comment

Comments

@nickschurch
Copy link

I have some visNetwork graphs that I make in an R markdown document. I don't seem to be able to alter the size of the viewport with either the R markdown chunk options (fig.width, fig.height) or with any of the visNetwork options, either when running the script in Rstudio or when knitting it to an html document.

Anyone got any ideas on how I can control this?

@nickschurch
Copy link
Author

I found a way to do this for the knit version. You add the following to a css file and add it to the html output yaml config in the markdown:

body {
  max-width: 4000px !important;
  margin: auto;
  padding: 1em;
}

.main-container {
  width: 100% !important;
  max-width: 4000px !important;
}

No solution yet though when running it inside Rstudio...

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

1 participant