# Labelling columns and lines in a MatrixPlot

I have a MatrixPlot that I would like to improve by adding labels.

The Matrix is composed with : - 14 columns, - 6 lines.

Instead of the graduation of the matrix, I would like to specify this labels :

• for the columns {"a","b","c","d","e","f","g","h","i","j","k","l","m","n"}
• for the lines {"eq1","eq2","eq3","eq4","eq5","eq6"} collabels =  CharacterRange["a", "n"];
rowlabels = Row[{"eq", #}] & /@ Range;
dat = RandomInteger[5, {6, 14}];
MatrixPlot[dat, FrameTicks -> {rowticks, colticks}] Or use

FrameTicks -> {rowticks, colticks,rowticks, colticks}]


to label all four sides: MatrixPlot[dat, FrameTicks -> {None, None, rowticks, colticks}] • Perfect! Thanks a lot. I would like to do a slight modification. Instead of the list {"a","b","c","d","e","f","g","h","i","j","k","l","m","n"}, I would like to use a list of variables of my problems T={a,b,c,d,e,f,g,h,i,j,k,l,m,n}. So I have tried to do like this map(ToString,T) so as to convert my list of variables into a list of strings but it seems that it doesn't work. Do you have ideas ? Feb 27, 2016 at 18:08
• @Bendesarts map(...) isn't valid MMA syntax. Feb 27, 2016 at 18:51
• Perfect! and how can I do to put the rowticks only on the right and the colticks only on the top ? Feb 28, 2016 at 8:42
• @Bendesarts, you can use FrameTicks -> {None, None, rowticks, colticks}].
– kglr
Feb 28, 2016 at 9:37
• @Bendesarts, tick labels do not have to be strings; you should be able to use subscripted symbols. Can you give an example of variables that is giving you trouble?
– kglr
Feb 28, 2016 at 9:55