Skip to content
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

Save plot to image file #2470

Closed
cdhf opened this issue Dec 17, 2022 · 3 comments · Fixed by #2769
Closed

Save plot to image file #2470

cdhf opened this issue Dec 17, 2022 · 3 comments · Fixed by #2769
Labels
feature New feature or request

Comments

@cdhf
Copy link

cdhf commented Dec 17, 2022

Is your feature request related to a problem? Please describe.
I am using the plot widget to visualize log data for failure analysis of hardware systems. I often need to save the plots to image files to include them in written reports. Often I need the info shown for the current mouse position as well, so I need to make a screenshot of the whole desktop, paste that into a separate program and then clip the image to the desired region.

Describe the solution you'd like
It would be great if there was builtin functionality to save a plot to an image file with user defined size. It would be even better, if there was a way generic way to save some part of the window to an image.

Describe alternatives you've considered
I've looked at the screenshot example, but it seems that I can only get a screenshot of the whole window, and that the quality of the image is limited.

@cdhf cdhf added the feature New feature or request label Dec 17, 2022
@saturn77
Copy link

I am having the same issue, in terms of figuring out a way to save the plot image only to an image.

Since I have the plot points available in a buffer in egui, one options is to simply make a button such as "save plot image" which would then use the current PlotPoints and write them to a png file.

Since matplotlib is kind of a standard, one consideration is to use one of the the Rust ports of matplotlib to create a PNG file from the data.

@hacknus
Copy link
Contributor

hacknus commented Feb 23, 2023

I would also really be interested in a egui built-in solution!

@dashdeckers
Copy link

I would love this as well! Would be an amazing feature for those using egui to visualize data to be able to save those visualizations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants