vega-embed icon indicating copy to clipboard operation
vega-embed copied to clipboard

Support ppi argument

Open joelostblom opened this issue 2 years ago • 2 comments

Vega-Lite 5.8 added support for a ppi argument to their CLI in https://github.com/vega/vega-lite/pull/8854. Being able to control the ppi of a figure is quite useful since that would give higher resolution without changing the displayed size (as scale/scale_factor does). Would it be possible to add a similar ppi setting to vega-embed?

joelostblom avatar Jul 14 '23 17:07 joelostblom

I think it makes sense. We already have scaleFactor and I'm not sure whether we can use ppi in view.toImageURL in https://github.com/vega/vega-embed/blob/617a57b97810ea59ebac519cac51ce2fd63100b7/src/embed.ts#L475. Do you know what we need to change to make ppi work?

domoritz avatar Jul 14 '23 21:07 domoritz

Nope, I'm not sure what to update but thought it would make sense to bring parity here with ppi since scaleFactor already exists as you pointed out.

joelostblom avatar Jul 15 '23 00:07 joelostblom