MATLAB Answers

0

How to use Maths Font for Graphs in MATLAB

Asked by Hollis Williams on 14 Jul 2019
Latest activity Answered by Star Strider
on 14 Jul 2019
I have produced a graph from some simulations which I intend to use in presentations and/or journal articles, but I have been told that I should have the writing on the axes of the graph in 'Maths font' in order to increase its professional appearance.
Could someone advise as to how I would make this change? I can include the code which I have used to produce the graph if that helps, I just need to know is there something I can change in the code to make the writing on the axes 'Maths font' or if I need to change the settings in MATLAB or change the image directly?
figure
hold
fsz = 10; % Fontsize
alw = 1.5; % LineWidth
msz =10; % MarkerSize
plot(KnA,gradS,'.','MarkerSize',msz,'MarkerFaceColor','blue')
grid on
box on
xhat=linspace(KnA(1),KnA(end)); % get 100 points between first, last
Shat=interp1(KnA,slipS,xhat,'spline'); % use spline interpolant between
plot(xhat,Shat,'g-')
xhat=linspace(KnA(1),KnA(end)); % get 100 points between first, last
Ghat=interp1(KnA,G13An,xhat,'spline'); % use spline interpolant between
plot(xhat,Ghat,'r-')
xhat=linspace(KnA(1),KnA(end)); % get 100 points between first, last
Ehat=interp1(KnA,expA,xhat,'spline'); % use spline interpolant between
plot(xhat,Ehat,'b-')
set(gca, 'FontSize', fsz, 'LineWidth', alw);
legend('MFS-G13','Analytic-Basset', 'Analytic-G13', 'Millikan exp. data','Location', 'NorthEast');
xlabel('Kn')
ylabel('F_d / F_s')
saveas(gcf,'Youngincll','epsc')

  0 Comments

Sign in to comment.

Tags

1 Answer

Answer by Star Strider
on 14 Jul 2019

I’m not certain what you want.
The text objects have an Interpreter name-value pair argument that ill allow you to do annotations, legends, and such in LaTeX. For help with that see: The Not So Short Introduction to LaTeX2e.

  0 Comments

Sign in to comment.