# Is it possible to substitute tick labels with alternative text? [duplicate]

Possible Duplicate:
Labelling ArrayPlot Charts

I am making a MatrixPlot. For example, consider the following:

list = {{1, 1, 0, 1}, {0, 0, 1, 1}, {1, 0, 1, 0}};
MatrixPlot[list]


which yields:

But now suppose I want to label the axes with other numbers. For example, I would like to label the ticks on the horizontal axis as 101, 167, 188, 205 (as they are not now), and the ticks on the vertical axis as 1, 2, 3 (as they already are). I know this is a strange request, but it is because I would like to label the horizontal axis according to "particle number" (which is an integer in my application).

Or maybe a better way to phrase the question is, is it possible to label axis/frame ticks with any arbitrary string (for example, labeling the horizontal axis with "Alice", "Bob", "Carla", and "David")? One possibility seems like FrameTicks, but I can't seem to figure out if it can be used to map strings.

If I use

list = {{1, 1, 0, 1}, {0, 0, 1, 1}, {1, 0, 1, 0}};
MatrixPlot[list,
FrameTicks -> {{{1, 2, 3}, None}, {{101, 167, 188, 205}, None}}]


I get:

because, of course, FrameTicks thinks I'm referring to which discrete values to label.

Also, if I try:

list = {{1, 1, 0, 1}, {0, 0, 1, 1}, {1, 0, 1, 0}};
MatrixPlot[list,
FrameTicks -> {{{1, 2, 3}, None}, {{"101", "167", "188", "205"},
None}}]


I get "Not a valid tick specification."

Do you have any other ideas?

-

## marked as duplicate by The Toad♦, Mr.Wizard♦Jun 9 '12 at 3:53

I believe this was covered in mathematica.stackexchange.com/questions/6043/…. –  David Carraher Jun 8 '12 at 16:11
This doesn't work because the frame ticks specification needs positions to determine where to place the labels. If you use numbers mma assumes positions == labels, and with the high values you're using they are out of the plot range. In the case of the strings as labels there is no position information at all. –  Sjoerd C. de Vries Jun 8 '12 at 17:39
This question is about something qualitatively different than the above-referenced question. FDSg's answer below is correct, and this should not be marked as a duplicate. –  Steven Bedrick Nov 6 '13 at 0:19

 MatrixPlot[list,