I use the following code to draw
Axes in 2D graphics:
But such code doesn't work with
Plot3D[…] and 3D graphics.
Is there any way to get
Arrows on 3D graphics?
Here is a simple way to do this:
This function draws three axes with arrows. To apply it:
This doesn't have axis labels, though.
To add labels by leveraging the built-in axes, one compromise (to save the work of making all labels by hand) would be to do the following:
In my attempt at a labeled set of axes above, I deliberately set the axes to be invisible but left the ticks visible. You may find it more visually consistent to keep the default axes visible, together with the new 3D arrow-axes. For this, one could replace
Jens's answer is great, and shows how to add arrow axes to a
You can add any option that normally goes to
But it isn't as general-purpose as I would like. In particular, it fails when the axes ranges are different orders of magnitude. Consider the following plots,
I tried to add arguments to the function that explicitly give the arrow tube radius and arrowhead size in the code pasted here but the results were no good. Any help would be appreciated.