Register to reply

Mathematica - Label plot ticks using strings

by ChristinaJ
Tags: mathematica, plot options, string, ticks
Share this thread:
May20-11, 09:33 AM
PF Gold
ChristinaJ's Avatar
P: 43

I have a ListSurfacePlot3D graphic and wish to label the tick marks using strings. For example if I have X={x1,x2,x3} I would like to label each tick mark at that point with a string, i.e. x1="a", x2="b" etc.

I would also like to know how to take a list of strings and distribute them evenly along the axis.

So far I have

ListSurfacePlot3D[ data , BoxRatios -> {1,1,1}, Ticks ->{{{1,"a"} , {2,"b"} , {3,"c"}} , {{1,"d"} , {2,"e"} , {3,"f"}} , {{1,"h"} , {2,"j"} , {3,"k"}}} ]

This gives the labels "d" , "e" ,"f" on the y-axiz but nothing on the x or z-axes.

Any help gratefully received.

Many thanks,
Phys.Org News Partner Science news on
Flapping baby birds give clues to origin of flight
Prions can trigger 'stuck' wine fermentations, researchers find
Socially-assistive robots help kids with autism learn by providing personalized prompts
May20-11, 07:29 PM
P: 313
Your Ticks construction is fine -- it's probably that your data is outside the range you gave the ticks. Put in an explicit PlotRange to check.

Maybe you should look at writing a function that takes the min and max of the axis and generates the ticks you want. See the Generalizations & Extensions section of

Register to reply

Related Discussions
Plot 3D matrix as 2D plot and 3rd dimension as color in Mathematica Math & Science Software 8
Mathematica Plot Ticks option Math & Science Software 3
Mathematica- Rotating a 2D plot into a 3D plot Math & Science Software 2
Mathematica Plot Math & Science Software 1
How to label more than one curves in Mathematica? Math & Science Software 1