Open AlFontal opened 1 year ago
Could it be made so that the self._ppi attribute is updated at instantiation time in cased it is passed as a kwarg and thus allowing more control on figure resolution?
Yea, that seems like the right thing to do...a PR would be quite welcome, thanks!
As it stands now, the
ppi
parameter used to render all kinds of plots is globally defined here: https://github.com/rstudio/py-shiny/blob/59bbe557dc10cdacca43be2895b5e8c627572b75/shiny/render/_render.py#L191-L194This is later on passed to all subsequent calls until either matplotlib's
savefig()
or plotnine/PIL'ssave()
methods.Passing kwargs that end up being passed to those methods with the
@render.plot
decorator is allowed, but since the previously definedself._ppi
is passed as an arg, adding the dpi kwarg with the decorator leads to a multiple values for argument error.Could it be made so that the
self._ppi
attribute is updated at instantiation time in cased it is passed as a kwarg and thus allowing more control on figure resolution?