How do I put subscripts in a Nichols plot legend?
This works fine in a normal plot:
figureplot([0 1],[3 4]); hold onplot([0 1],[4 5])plot([0 1],[5 6])legend('G_2', 'G^2', 'G^2_p')saveas(gcf,'test1.png')
produces:
But:
figurenichols(Gp); hold onnichols(Gc1*Gp);nichols(Gc2*Gp);legend('G_2', 'G^2', 'G^2_p')saveas(gcf,'test2.png')
produces:
I tried this:
figurenichols(Gp); hold onnichols(Gc1*Gp);nichols(Gc2*Gp);legend('$G_2$', '$G^2$', '$\hat{G}^2_{p}$','Interpreter','Latex')
Produces:
Maybe this is the same bug reported in this question in 2015: Subscripts in MATLAB Legends
Best Answer