8000 Export enters an endless loop when called from within a live editor file · Issue #375 · altmany/export_fig · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Export enters an endless loop when called from within a live editor file #375

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

Closed
bernb opened this issue May 10, 2023 · 1 comment
Closed

Comments

@bernb
Copy link
bernb commented May 10, 2023

For example,

[x,y] = meshgrid(1:15,1:15);
z = peaks(15);
T = delaunay(x,y);
p = trisurf(T,x,y,z);
export_fig(p.Parent, "test.png");

does work as intended when used from within the command window or a regular matlab file, but it seems to enter an endless loop when used from within the live editor (a *.mlx file). The issue seems to be related to drawnow.

A possible workaround is to undock the figure before exporting. This does however prevent it from being shown in the output column of the live editor:

[x,y] = meshgrid(1:15,1:15);
z = peaks(15);
T = delaunay(x,y);
p = trisurf(T,x,y,z);
set(p.Parent.Parent, 'Visible', 'on');
export_fig(p.Parent, "test.png");
set(p.Parent.Parent, 'Visible', 'off');

Matlab version: 2022b

altmany added a commit that referenced this issue May 15, 2023
…(issue #375); don't warn about exportgraphics/copygraphics alternatives in deployed mode
@altmany
Copy link
Owner
altmany commented May 15, 2023

Thanks for the report. I fixed the endless recursion in the latest commit (c2126db)

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

No branches or pull requests

2 participants
0