Fix Extra Space in Figure using xlabel
Ältere Kommentare anzeigen
I am currently trying to prepare some figures for a final draft of my paper. I have generated some data and plotted a histogram using histfit. I then attempt to label the data using xlabel. I then set the size of the histogram to save it.
All well and good. However, when I save the figure using saveas, I have a big space between the m and the 2. As expected, Matlab is interpreting this as LaTeX code and it's appearing as a superscript. However, I'd like to get rid of the space between the m and the 2.
What's strange is that if I save as an eps, I have this problem, but if I save as a pdf I don't. Here's my minimal working example:
hSize=[6.5,2.5];
A=50*rand(200,1);
histfit(A,20,'gamma')
xlabel('Measured Area (m^2)')
ylabel('Frequency')
set(gcf,'Color',[1 1 1],'PaperUnits','inches','PaperSize',hSize,...
'PaperPosition',[0 0 hSize]);
saveas(gcf, [mypath, '/example.eps'],'epsc') %replace mypath with your own path
1 Kommentar
jamesdg
am 12 Feb. 2015
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Printing and Saving finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
