Skip to content

no effect with jupyter.plot.resolution and jupyter.plot.zoom options #5

@alusiani

Description

@alusiani

Hi,

thanks for publishing this R Jupyter kernel! I have tried to use it, successfully, but I am getting too-small-sized ggplot inline plots in Jupterlab. I can surely increase the size of the plots using the options jupyter.plot.width and jupyter.plot.height, but that results in small points, line widths and characters, unless heavily customizing. With IRKernel, I can use option repr.plot.res to rescale the inline plots as I like. Looking at the source code of RKernel, it seems that I should use options jupyter.plot.resolution and jupyter.plot.zoom: I tried them but they apparently produce no effect at all. I attach a minimal notebook as example. Is there a way I could get larger inline plots than the default? I would like to ge the default ggplot plot text at the same size as the notebook cells text size.

library(ggplot2)
rc = ggplot(mpg, aes(displ, hwy, colour = class)) +
  geom_point()
options(jupyter.plot.width = 7, jupyter.plot.height = 7, jupyter.plot.resolution = 72, jupyter.plot.zoom = 1)
rc
options(jupyter.plot.width = 8, jupyter.plot.height = 4, jupyter.plot.resolution = 72, jupyter.plot.zoom = 1)
rc
options(jupyter.plot.width = 8, jupyter.plot.height = 4, jupyter.plot.resolution = 200, jupyter.plot.zoom = 1)
rc
options(jupyter.plot.width = 8, jupyter.plot.height = 4, jupyter.plot.resolution = 72, jupyter.plot.zoom = 2)
rc
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions