Black Lives Matter. Please consider donating to Black Girls Code today.

3D Surface Plot Axis Title Break Woes


I’ve created a 3D surface plot and I’d like to wrap (or break) axis titles so that they appear on two (or more) lines. Through some diligent Googling and perusing of forums, I’ve already learned that html notation for line breaks
(rather than R’s new line notation) should do the trick. Unfortunately, this doesn’t appear to work, perhaps a unique feature of surface plots only (?). Does anyone have any insight on this dilemma?

For reference, here’s a snippet of code for setting axis titles:

layout(scene = list(xaxis = list(title = ‘Drift
(no. m-3)’),
yaxis = list(title = ‘Temp
zaxis = list(title = ‘Cap.
(no. 100m-2)’)))

and a link to the figure (note the lack of breaks):

Thanks in advance!


I have the exact same issue and still haven’t been able to figure it out. Did you ever work out a solution?