Code Monkey home page Code Monkey logo

Comments (6)

jjallaire avatar jjallaire commented on August 19, 2024

We do indeed set width to 100% for plots (mostly so that they occupy the full width of layouts that exceed the bounds of the text column though). Perhaps we could not do this for the default l-body layout. To ensure that we're addressing exactly your scenario, could you please include a short example Rmd that exhibits the problematic behavior?

from distill.

jjallaire avatar jjallaire commented on August 19, 2024

I attempted a fix here: rstudio/radix@d2e4f81

Let me know if that works as expected for your scenario.

from distill.

MarcioFCMartins avatar MarcioFCMartins commented on August 19, 2024

Thank you for being so quick. I will do some more tests as I finish my reports but the 2 cases that were giving me issues before are working just fine! I can now use out.width to change the size of my output or simply leave it blank to display plots at the size rendered by R - just what I wanted.

While I understand why you went with the option of forcing 100%, it's not always the best if the user desires to have plots with certain aspect ratios. In my case, I am using raster files of sediment cores (which are very long but thin) as a background for my plots and to mantain decent aspect ratios I would need gigantic plots.

Thank you for your work into this project.

from distill.

jjallaire avatar jjallaire commented on August 19, 2024

Great, glad it's working as desired now! Let me know if you find other cases that don't quite act the way you want them to.

from distill.

MarcioFCMartins avatar MarcioFCMartins commented on August 19, 2024

I just encountered another issue - adding a figure caption (via the fig.cap chunk option) sets the out.width to 100% again, even in cases that were fixed by your previous update.

from distill.

jjallaire avatar jjallaire commented on August 19, 2024

Thanks for reporting, should be fixed now!

from distill.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.