Skip to content

w h parameters do not override for svg and html #1368

@Zaf4

Description

@Zaf4

I was testing the ggsave changes including the to_* methods.

ggsave: the w and h parameters override plot size, allowing to specify the output image size independently of the plot size.

to_pdf, to_png works perfectly as well as their ggsave counterparts.

However,

plot.to_svg("test.svg", w=9,h=3)

raises the following error

TypeError: PlotSpec.to_svg() got an unexpected keyword argument 'w'

while ggsave does not raise any errors (with .html and .svg), it does not resize the plot according to w and h params.

This might be intentional but I think being able to resize the plot while saving —even for svg and html formats— would be a huge quality-of-life improvement.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions