how to off figure popup window?

64 ビュー (過去 30 日間)
garima sharma
garima sharma 2021 年 4 月 15 日
コメント済み: garima sharma 2022 年 1 月 30 日
Hi,
In my script, I am trying to save the generated figures from matlab to word file, while saving the figure a continuous pop-up window is generating.
I want to hide the figure pop-up window. I tried with the following command,
figure(visible,'off');
but its not stopping the pop-up window instead hide plot in figure pop-up window and saved word file which doesnot have plots (it has only blank boxes with no plot in it).
is there any way to reslove this problem?
Thank you in advance!
  2 件のコメント
Jan
Jan 2021 年 4 月 15 日
How do you save the contents of the figure?
Do you mean:
figure('visible', 'off');
% ^ ^ With quotes
If you create a figure with this command, it is invisible. Capturing the contents does not work with all methods. If you still see a window, it is created somewhere else. Please inspect your code to find the command, which creates the figures.
garima sharma
garima sharma 2021 年 4 月 18 日
Thank you for replying.
yes, it is
figure('visible', 'off');
to capture the content of figure, I am using following command
print -f1 -dmeta
So basically, i have tried to generatre a figure then capture it and save into word file, then off the visibility of figure window to stop poping-up a window. but its not working in my case.

サインインしてコメントする。

回答 (1 件)

Richard Quist
Richard Quist 2021 年 11 月 29 日
You didn't mention what version of MATLAB you are using but something like this should work:
% create a figure and remember its handle
f = figure('visible', 'off');
% create a plot inside that figure
plot(rand(4));
% copy the figure to the clipboard
print(f, '-dmeta');
If you're using R2020a or later you may be able to replace the print call above with a call to copygraphics
% available in R2020a and later
copygraphics(f);
  1 件のコメント
garima sharma
garima sharma 2022 年 1 月 30 日
I am using R2016a

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeInteractive Control and Callbacks についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by