Skip to content

Name png exports using plot title #5124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
daviddekoning opened this issue Sep 4, 2020 · 3 comments
Open

Name png exports using plot title #5124

daviddekoning opened this issue Sep 4, 2020 · 3 comments
Labels
feature something new P3 backlog
Milestone

Comments

@daviddekoning
Copy link

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.

@daviddekoning
Copy link
Author

or maybe plotly.express can santize the plot title and set the plot object filename?

@archmoj archmoj added the feature something new label Sep 11, 2020
@nicolaskruchten
Copy link
Contributor

See also #1227

@archmoj
Copy link
Contributor

archmoj commented Jun 14, 2024

Perhaps we could add an option to use a desired default name as well as title and subtitle.
cc: @emilykl

@gvwilson gvwilson self-assigned this Jul 8, 2024
@gvwilson gvwilson removed their assignment Aug 2, 2024
@gvwilson gvwilson added the P3 backlog label Aug 9, 2024
@archmoj archmoj added this to the v3.0.0 milestone Oct 4, 2024
@archmoj archmoj modified the milestones: v3.0.0, v4.0.0 Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new P3 backlog
Projects
None yet
Development

No branches or pull requests

4 participants