3
$\begingroup$

I need to divide the axis period when plotting and use Detailed theme

For example,

Plot[x, {x, 0, 1}, 
 Ticks -> {0, .1, .2, .3, .4, .5, .6, .7, .8, .9, 1}, 
 PlotTheme -> "Detailed"]

enter image description here

But when using the three-dimensional plotting (Plot3D) do not work with the theme.

Plot3D[x y, {x, 0, 1}, {y, 0, 
  1}, {Ticks -> {{0, .1, .2, .3, .4, .5, .6, .7, .8, .9, 
     1}, {0, .1, .2, .3, .4, .5, .6, .7, .8, .9, 1}}}, 
 PlotTheme -> "Detailed"]

enter image description here

what is the reason?

Is there a solution to operate the theme by dividing the axis?

$\endgroup$

2 Answers 2

4
$\begingroup$

You have to specify the Facegrids yourself, f.e. like this:

Plot3D[x y, {x, 0, 1}, {y, 0, 1},
 Ticks -> {{0, .1, .2, .3, .4, .5, .6, .7, .8, .9, 1}, {0, .1, .2, .3, .4, .5, .6, .7, .8, .9, 1}},
 FaceGrids -> {
   {{0, 1, 0}, {Range[0, 1, 0.1], Range[0, 1, 0.1]}},
   {{-1, 0, 0}, {Range[0, 1, 0.1], Range[0, 1, 0.1]}}},
 ImageSize -> Large,
 PlotTheme -> "Detailed"]

enter image description here

$\endgroup$
5
$\begingroup$

You can get the same look as the 2D graph by specifying the ticks for all three axes. Like so:

Plot3D[x y, {x, 0, 1}, {y, 0, 1},
  BoxRatios -> 1,
  Ticks -> ConstantArray[Range[0, 1, .2], 3],
  PlotTheme -> "Detailed"]

plot

Giving the BoxRatios option isn't necessary. I just think it makes the plot look better.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.