Does that help For subscripts in the legend, use the function expression, and the terms to be subscript between "[ ]" (square brackets): code :
legend(x='topright',col=c("black","black"),lty=c(1,2,3),legend=c(expression(a[ij]),expression(b[ij]),"Difference"),bty="n")
legend(x='topright',col=c("black","black"),lty=c(1,2,3),legend=c(expression(a[italic(ij)]),expression(b[italic(ij)]),"Difference"),bty="n")
Share :

Is there a way to override LaTeX's errors about double subscripts and superscripts?
By : Prashant Gupta
Date : March 29 2020, 07:55 AM
around this issue Minor point about LaTeX that bothers me. When one writes , The following is what you wish code :
\catcode`\^ = 13 \def^#1{\sp{#1}{}}
\catcode`\_ = 13 \def_#1{\sb{#1}{}}

MATLAB graph plotting: assigning legend labels during plot
By : Kayode Faturoti
Date : March 29 2020, 07:55 AM
hop of those help? I am plotting data in a typical MATLAB scatterplot format. Ordinarily when plotting multiple datasets, I would use the command 'hold on;', and then plot each of the data, followed by this to get my legend: , One option is to take advantage of the 'UserData' property like so: code :
figure;
hold on
plot([0 1], [1 0], 'b', 'userdata', 'blue line')
plot([1 0], [1 0], 'r', 'userdata', 'red dashes')
% legend(get(get(gca, 'children'), 'userdata')) % wrong
legend(get(gca, 'children'), get(get(gca, 'children'), 'userdata')) % correct

Legend Overlapping in graph plotting area
By : zacwai
Date : March 29 2020, 07:55 AM
I wish this helpful for you I have a dataframe as below (obtained after lot of preprocessing) , Just replace code :
ax.legend(loc='left', bbox_to_anchor=(1, 0))
ax.legend(loc=(1.05, 0.2))

Matlab graph plotting  Legend and curves with labels
By : Thales Evangelista
Date : March 29 2020, 07:55 AM
hope this fix your issue Plotting data labels within lines is possible with clabel (contour labels), although this requires that you to plot your data with the contour command. Although if you can't plot it as a contour plot then you should be able to convert your plot data to a contour matrix format, see the matrix definition at the bottom of the help page on the contour algorithm. This is a simple 2 row vector defining your data points, you should be able to feed this matrix into the clabel function to print the data labels inline.

Latex  How do I make subscripts smaller when they are in fractions
By : KAH
Date : March 29 2020, 07:55 AM
Any of those help I'm using something I found elsewhere and adapting it to use with Greek letters. It might help in your case

