MATLAB Fixing Corrupted y-Label Text in Word

  • Thread starter Thread starter hokhani
  • Start date Start date
  • Tags Tags
    Text
AI Thread Summary
The discussion focuses on issues with copying figures from MATLAB to Word, specifically regarding the corruption of y-axis labels when pasted. Users note that simply copying figures may not preserve formatting, particularly for LaTeX-rendered text. It is recommended to save figures using the 'saveas' command to ensure proper formatting and avoid corruption. Additionally, using the 'print' function with specific clipboard format parameters can help maintain text integrity when copying figures. The conversation highlights that restarting MATLAB can inadvertently resolve display issues, but this is not an ideal workflow. The consensus suggests saving figures externally for better reliability in presentations and document sharing.
hokhani
Messages
552
Reaction score
15
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

Back
Top