Bug in Copy FIgure clips out part of figure

106 ビュー (過去 30 日間)
T A
T A 2017 年 9 月 22 日
コメント済み: T A 2024 年 2 月 19 日
I've recently installed Matlab (R2017a on Windows 10 Home) on a new laptop and just noticed that the Copy Figure button results in only part of the figure being pasted. Specifically, the upper-left portion of the figure is preserved, but the rest is lost. I've not done any adjustments to the figure dimensions nor axes bounds, nor am I using any specialized plotting software, so this appears to be the default behavior. I've tested pasting into several MS Office products and MS Paint, all showing the same behavior. Below is a sample of what gets pasted into MS Paint for reference.
Manually resizing the figure axis bounds so that the axis is located in the upper-left section of the figure window (shown in the second plot below) results in the entire figure being copy-paste-able. This seems to imply the issue is related to Matlab's perception of the figure bounding box.
I noticed this link: https://www.mathworks.com/matlabcentral/answers/197305-possible-bug-in-copying-figures which alludes to a similar issue, though it was R2015a. Thanks in advance for any help.
  2 件のコメント
Steven Lord
Steven Lord 2017 年 9 月 22 日
I don't see any attached pictures. Please try attaching it or including it in a comment again using either the Image button (the one with the green picture) or the Attach file button (the one with the paperclip.)
T A
T A 2017 年 9 月 22 日
Post updated with the figure, also added some more info.

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

採用された回答

George Mencoff
George Mencoff 2018 年 5 月 2 日
I was having the same problem on windows 10. If you click "edit" and "copy options", and change the clipboard format to bitmap, it may fix your problem. This worked for me.
  1 件のコメント
Ernst Broberg Hansen
Ernst Broberg Hansen 2019 年 9 月 4 日
Excellent!
Worked for me as well. Exatctly same problem. Weird, that the problem started today, but I've had Win10 and Matlab for several months...

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

その他の回答 (3 件)

Marcelo Moraes
Marcelo Moraes 2022 年 1 月 6 日
Hi,
I solved the issue by changing the Windows High DPI scaling as follows:
Right-click on matlab.exe => Properties
Compatibility
Change high DPI settings
Check "Override high DPI scaling behavior".
Select "System"
OK.
Restart Matlab.
  1 件のコメント
Arun Kumar Kantheti
Arun Kumar Kantheti 2024 年 2 月 19 日
This worked for me. Thanks!

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


T A
T A 2017 年 10 月 3 日
The problem appears to be with Windows 10. The zoom level setting in Windows 10 affects how multiple applications perceive a visible window's extent. For instance, the same buggy behavior can be seen in MS Excel by following these steps:
1) Open Excel and create a new empty spreadsheet
2) File some rows and columns with any data
3) Select the filled cells
4) Select Copy->Copy as Picture... in the toolstrip
5) Select Picture Format and click OK
6) Paste
  2 件のコメント
Mahdi Torabi
Mahdi Torabi 2019 年 5 月 24 日
so is there any way to solve this?
T A
T A 2024 年 2 月 19 日
@Mahdi Torabi I've not had this issues with newer computers and/or Matlab versions, so I cannot say for sure. But other users have suggested solutions in this thread that you might want to try.

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


Peter Middleton
Peter Middleton 2019 年 12 月 17 日
Yes - just had the same issue. Go to Win10 display settings and select the recommended zoom level (150% on my system) - now pastes ok.
  1 件のコメント
seager1989
seager1989 2020 年 5 月 10 日
The 125% works for me.

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

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by