-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
I would like to be able to set the size of my figure in pixels rather than inches using options()
IRkernel used to have set_plot_options() function which permitted specifying units because everything was just being passed to PNG call (https://github.com/IRkernel/IRkernel/pull/82/files#diff-d6114b524c43b90f0e7f0b24a0af9f94L10).
Currently we can only change the size using repr.plot.res, repr.plot.width and repr.plot.height. Would it be possible to add repr.plot.unit="in" so that it can be changed to "px"?
This should be pretty straightforward change and remove the inches hard-coded in:
Lines 93 to 95 in 7b0a098
| Cairo::Cairo(width, height, tf, 'png', pointsize, bg, 'transparent', 'in', res) | |
| else | |
| png(tf, width, height, 'in', pointsize, bg, res, antialias = antialias) |
I'm happy to create a pull request if this is change is welcome.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels