Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: x and y labels in ArrayPlot
Replies: 5   Last Post: Nov 9, 2010 3:55 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Gordon Robertson

Posts: 18
Registered: 11/15/07
x and y labels in ArrayPlot
Posted: Nov 8, 2010 3:37 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


I would like to plot an array of integer values, and to put labels on
each row (a,c,b) and column (A,B,C) of the array, with x-labels on the
left and y-labels above and potentially rotated by 45 or 90 degrees.
ArrayPlot seems appropriate, but I do not see how to add the labels.
I've tried to check the Help documentation carefully, including
MatrixPlot and alternatives, and the WRI demonstrations.

data = {{1, 2, 3},
{2, 3, 4},
{3, 4, 5}}
yLabels = {"a", "b", "c"}
xLabels = {"A", "B", "C"}
ArrayPlot[data]

Thanks for your help.

Gordon
--
Gordon Robertson
BC Cancer Agency Genome Sciences Centre
Vancouver BC Canada
604-707-5800
www.bcgsc.ca






Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.