I use surf to plot 3D surface, and I try to add borders using "box on", but it can only show 3 borders. see
However, What I really want is to add all 6 borders for the cube, like this
.
Could anyone tell me how to do that?
CodePudding user response:
You need to change the axes BoxStyle
to 'full'
, with the Box
on. For example:
[x,y] = meshgrid( 0:0.1:6, 0:0.1:6 );
surf( x, y, cos(x) sin(y), 'LineStyle', 'none' );
set( gca, 'Box', 'on', 'BoxStyle', 'full' );