Fixing Corrupted y-Label Text in Word

  • Context: MATLAB 
  • Thread starter Thread starter hokhani
  • Start date Start date
  • Tags Tags
    Text
Click For Summary

Discussion Overview

The discussion revolves around issues related to copying y-label text from MATLAB figures into Microsoft Word, specifically focusing on the corruption of the y-label text when pasted. The scope includes technical explanations and proposed solutions for maintaining the integrity of the figure's text during this process.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant notes that copying figures directly from MATLAB may lead to corrupted text in Word and suggests saving the figure in a specific output format instead.
  • Another participant describes a scenario where figures pasted into Word appear correct initially but become corrupted after restarting the computer, indicating a potential issue with MATLAB's handling of the clipboard.
  • A different participant emphasizes the need to specify parameters when copying to the clipboard, referencing MATLAB's documentation on clipboard formats as a potential solution.
  • One participant recommends using the saveas command to create an external figure file, which could help avoid issues with text corruption in Word.

Areas of Agreement / Disagreement

Participants express differing views on the best approach to prevent text corruption, with no consensus reached on a single solution. Some advocate for saving figures in specific formats, while others highlight the importance of clipboard parameters.

Contextual Notes

Limitations include the lack of clarity on the specific conditions under which the text corruption occurs and the dependence on MATLAB's clipboard handling, which may vary based on system configurations.

hokhani
Messages
601
Reaction score
22
I used the label for y-axis as below and plot the figure.
Code:
ylabel('$\frac{|Iup|-|Idown|}{|Iup|+|Idown|}$','interpreter','latex','FontSize',30)
but when I copy the figure in the word, the y-label text is corrupted. What should I do?
 
Physics news on Phys.org
soarce said:
I think that from Matlab you can't simply "copy" the figure, one has to save the figure specifying explicitly the output format, see http://es.mathworks.com/help/matlab/ref/saveas.html
When I copy the figure from "Figure/Edit/copy figure" and paste it into word, the figure is correctly pasted but when I restart the computer the text on the y-axis corrupts. However if I open Matlab again and do "Figure/Edit/copy figure and past" all the earlier figures will become corrected!
 
You should specify the parameters when copying to clipboard, see for instance

http://es.mathworks.com/help/matlab/ref/print.html#bumf4p_-1

where the clipboardformat parameter takes on the following values:

http://es.mathworks.com/help/matlab/ref/print.html#inputarg_clipboardformat

The flow that you are follow it's rather strange, one shouldn't restart Matlab in order to see correctly those figures!
I would use the saveas command. In this way you keep a figure file external to the word document for later use (presentation, sharing etc.)
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 2 ·
Replies
2
Views
8K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 9 ·
Replies
9
Views
5K
  • · Replies 7 ·
Replies
7
Views
4K