Skip to content

Name png exports using plot title #5124

Open
@daviddekoning

Description

@daviddekoning

Currently, when you export a png from a plotly figure, it is saved as newplot.png. Since most plots (the good ones anyways :) ) have titles specified, it would be great if the file could take its name from the figure title. E.G. if there is a figure with the title Daily Active Users, it could be saved as Daily Active Users.png.

This is particularly helpful when working in a jupyter notebook with multiple figures - at the moment, exporting multiple figures just yields a bunch of files called newplot.png, newplot (1).png, etc...

It might be a quick fix here:

var filename = opts.filename || gd.fn || 'newplot';
, but the question of escaping / sanitizing the plot title into a filename might need some thought.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3backlogfeaturesomething new

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions