Re: Changing Plot Axis Displays

*To*: mathgroup at smc.vnet.net*Subject*: [mg54734] Re: Changing Plot Axis Displays*From*: Helen Read <hpr at together.net>*Date*: Mon, 28 Feb 2005 03:27:34 -0500 (EST)*References*: <cvrq3b$p2k$1@smc.vnet.net>*Reply-to*: read at math.uvm.edu*Sender*: owner-wri-mathgroup at wolfram.com

plizak wrote: > I have a table that I want to plot, it's a list plot > > A = {{.1,.2,.3,.4,.5} > {.1,.2,.3,.4,.6} > {.1,.2,.3,.5,.7} > {.1,.2,.5,.6,.8} } Ok, you need commas in here. A = {{.1,.2,.3,.4,.5}, {.1,.2,.3,.4,.6}, {.1,.2,.3,.5,.7}, {.1,.2,.5,.6,.8} } Post your code exactly, so that people can paste it into Mathematica and have it work. > ListPlot3D[A, AxesLabel->{"Years", "Ratings", "rates"} Needs a closing bracket. (See comment above.) ListPlot3D[A, AxesLabel->{"Years", "Ratings", "rates"}] > Q: I would like the "Ratings" axis to not be numbers 1,2,3 > and 4, but rather A, B, C, and D. Is this possible in > mathematica? > > Q: Can I change the "rates" to be in Percent? i.e instead of > having the Z axis from 0 to 0.80, could I have the Z axis > go from 0% to 80%? > > Q: Can I offset the "Years" to be 5, 10, 15 and 20 as opposed > to 1,2,3 and 4? This is really all one question. All it requires is setting up the ticks that you want for each axis. Here's one way to do it. A = {{.1, .2, .3, .4, .5} , {.1, .2, .3, .4, .6} , {.1, .2, .3, .5, .7}, {.1, .2, .5, .6, .8}}; ticks1 = {{1, "5"}, {2, "10"}, {3, "15"}, {4, "20"}}; ticks2 = {{1, "A"}, {2, "B"}, {3, "C"}, {4, "D"}}; ticks3 = {0, {.2, "20%"}, {.4, "40%"}, {.6, "60%"}, {.8, "80%"}}; ListPlot3D[A, AxesLabel -> {"Years", "Ratings", "rates"}, Ticks -> {ticks1, ticks2, ticks3}] -- Helen Read University of Vermont