set (0, "defaulttextfontname", "FreeSans") set (0, "defaultaxesfontname", "FreeSans") clf subplot (2,2,1) sombrero title ("\"sombrero\" is{\\fontname{courier} sin (r)/r} with\n{\\fontname{courier}r = \\surd (x^2 + y^2)}"); subplot (2,2,2) plot (1:10) title ("Title with{\\it italics},{\\bf \ bold},\n{\\fontsize{15}large }and {\\color{red}coloured }texts") text (5,5,0.1,"Greek letters:\n\ \\alpha\\beta\\gamma\\epsilon\\zeta\\eta\\theta\\iota\\kappa\\lambda\\mu\n\ \\nu\\xi\\pi\\rho\\sigma\\tau\\upsilon\\phi\\chi\\psi\\omega\n\ \\Gamma\\Theta\\Lambda\n\ \\Xi\\Pi\\Sigma\\Upsilon\\Phi\\Psi\\Omega", ... "horizontalalignment", "center") subplot (2,2,3) x = 0:.1:10; tau = 2; plot (x, exp (-x/tau)) hold on x = 0:.1:2; plot (x, 1-x/tau, "-r") xt = get (gca, "xtick"); xt = unique ([xt tau]); xtl = arrayfun (@num2str, xt, "uniformoutput", false); xtl{xt == tau} = "\\tau"; set (gca, "xtick", xt) set (gca, "xticklabel", xtl) text ((1-0.1)*tau, 0.1, "\\leftarrow\ 1-t/\\tau") xlabel ("t") ylabel ("e^{-t/\\tau}") subplot (2,2,4) loglog (1:1000) xt = get (gca, "xtick"); xtl = arrayfun (@(x) sprintf ("10^{%d}", log10(x)), xt, "uniformoutput", false); set (gca, "xticklabel", xtl); set (gca, "yticklabel", xtl); units = get (gca, "units"); set (gca, "units", "pixels") pos = get (gca, "position")(3:4); set (gca, "units", units) ang = angle (complex (pos(1), pos(2)))*180/pi; text (50, 50, "y = x", "rotation", ang, "verticalalignment", "bottom")