# Ticks Label in 3Dplot in Mathematica

In 3DListPlot, I am plotting data such that I have discretized a contineous function. While plotting, I automatically get the ticks labeling, marking the discrete points. I want to replace the labeling with the labeling of my continuous data, means instead of going from 0 to 1000 points, I want to mark it as going form -5 to 5.

Use the option DataRange to specify the actual range of coordinates:

ListPlot3D[Table[Sin[i/10 + j/100], {i, 0, 10, 1}, {j, 0, 100, 0.1}]]


ListPlot3D[Table[Sin[i/10 + j/100], {i, 0, 10, 1}, {j, 0, 100, 0.1}],
DataRange -> {{-5, 5}, {0, 10}}]


Update: you can label the ticks the way you wish using the option Ticks:

ListPlot3D[Table[Sin[i/10 + j/100], {i, 0, 10, 1}, {j, 0, 100, 0.1}],
DataRange -> {{-5, 5}, {0, 10}},
Ticks -> {{{-5, Row[{-5, Pi/2}]}, {0, Row[{0, Pi/2}]}, {5, Row[{5, Pi/2}]}},
Automatic, Automatic}]


• may I ask one more thing? What if I want to add some constant term in ticks label. Means if I want to label ticks as -5X to 5X where X is some constant. Oct 9, 2014 at 9:19
• I tried it. The problem is that if x is say x=Pi/2, then in plot it is automatically multiplying -5 with Pi/2 and plotting in terms of answer. My interest was to show on plot -5x rather than multiplied number. Oct 9, 2014 at 9:31
• @zenith, you can use the option Ticks: e.g. with x predefined (say x=10), add the option Ticks -> {{{-5, -5 x}, {0, 0 x}, {5, 5 x}}, Automatic, Automatic} to Plot3D. Or, perhaps, something like Ticks -> {{{-5, Row[{-5, Pi/2}]}, {0, Row[{0, Pi/2}]}, {5, Row[{5, Pi/2}]}}, Automatic, Automatic}..
– kglr
Oct 9, 2014 at 9:32
• Alright. Let me try this. Thanks again for contentious help. Oct 9, 2014 at 9:44
• Really appreciate for hepling me to solve the problem Oct 9, 2014 at 9:56