# Put labels sloped along axes in ListPlot3D

The three text labels in the following figure are all in horizontal direction.

How to put the labels sloped along each axis to which it is attached?

My Code

data = Table[Sin[j^2 + i], {i, 0, Pi, Pi/5}, {j, 0, Pi, Pi/5}];
testGraph =
ListPlot3D[data, Mesh -> None, InterpolationOrder -> 3,
ColorFunction -> "SouthwestColors",
AxesLabel -> {"Number of Processes", "Number of Operations",
"Time (ms)"},
ImageSize -> 350]


My Figure

Desired Effect

I want the labels to be sloped along axes, just like in the following figure (made by Python; Please ignore other elements but the labels).

Note: The answer given below by @eldo uses hard-coded angles. Do you have better solutions?

testGraph =
ListPlot3D[data,
Mesh -> None,
InterpolationOrder -> 3,
ColorFunction -> "SouthwestColors",
AxesLabel ->
{Rotate["Number of Processes", - 20 Degree],
Rotate["Number of Operations", 60 Degree],
Rotate["Time (ms)", 95 Degree]},
ImageSize -> 450]


• It seems that the angles are hard-coded such that I have to tune them every time I rotate the figure. Anyway, this approach works. Thanks. (I will leave the post "open" for a while before accepting your answer to see whether there are better solutions). – hengxin Apr 24 '15 at 3:05
• Yes, they are. Theoretically it should be possible to build a lookup-table to get the "slopes" (degrees) from the most common ViewPoint-settings. But I doubt that anybody here would like to do this. – eldo Apr 24 '15 at 17:32