Skip to main content
Added note explaining source of problem
Source Link
m_goldberg
  • 108.6k
  • 16
  • 107
  • 263

There is no reason not to use the option AxesStyle -> 40. AxesStyle affects the axes labels and in a style specification an integer is taken as a point size specification. But if you give the point size specification in AxesStyle, you don't need to repeat it in AxesLabel.

So you can use simple form.

Block[{x, p}, rho[n_][x_, p_] = With[{h = 1, H = (1/2)*(p^2 + x^2)}, (1/Pi) (-1)^n Exp[-2 H/h] LaguerreL[n, 4 H/h]]]; ImageCrop[ Plot3D[rho[0][x, p], {x, -5, 5}, {p, -5, 5}, PlotPoints -> 100, PlotRange -> All, ImageSize -> 800, AxesLabel -> {x, p, None}, AxesStyle -> 40, Boxed -> False, TicksStyle -> 20, PlotTheme -> "Classic"]] 

plot

This image was made in V11.0.1.

P.S. The reason you had ran into a problem with your options was that you specified

AxesLabel -> {Style[x, FontSize -> 40], Style[p, FontSize -> 40]} 

where

AxesLabel -> {Style[x, FontSize -> 40], Style[p, FontSize -> 40], None} 

is required. In a 3D plot you should specify labels for all three axes. If you could get away with specifying labels for only two of the axes in older versions of Mathematica, that was a bug that has been fixed. The form with all three elements specified works as you would expect.

There is no reason not to use the option AxesStyle -> 40. AxesStyle affects the axes labels and in a style specification an integer is taken as a point size specification. But if you give the point size specification in AxesStyle, you don't need to repeat it in AxesLabel.

So you can use simple form.

Block[{x, p}, rho[n_][x_, p_] = With[{h = 1, H = (1/2)*(p^2 + x^2)}, (1/Pi) (-1)^n Exp[-2 H/h] LaguerreL[n, 4 H/h]]]; ImageCrop[ Plot3D[rho[0][x, p], {x, -5, 5}, {p, -5, 5}, PlotPoints -> 100, PlotRange -> All, ImageSize -> 800, AxesLabel -> {x, p, None}, AxesStyle -> 40, Boxed -> False, TicksStyle -> 20, PlotTheme -> "Classic"]] 

plot

This image was made in V11.0.1.

There is no reason not to use the option AxesStyle -> 40. AxesStyle affects the axes labels and in a style specification an integer is taken as a point size specification. But if you give the point size specification in AxesStyle, you don't need to repeat it in AxesLabel.

So you can use simple form.

Block[{x, p}, rho[n_][x_, p_] = With[{h = 1, H = (1/2)*(p^2 + x^2)}, (1/Pi) (-1)^n Exp[-2 H/h] LaguerreL[n, 4 H/h]]]; ImageCrop[ Plot3D[rho[0][x, p], {x, -5, 5}, {p, -5, 5}, PlotPoints -> 100, PlotRange -> All, ImageSize -> 800, AxesLabel -> {x, p, None}, AxesStyle -> 40, Boxed -> False, TicksStyle -> 20, PlotTheme -> "Classic"]] 

plot

This image was made in V11.0.1.

P.S. The reason you had ran into a problem with your options was that you specified

AxesLabel -> {Style[x, FontSize -> 40], Style[p, FontSize -> 40]} 

where

AxesLabel -> {Style[x, FontSize -> 40], Style[p, FontSize -> 40], None} 

is required. In a 3D plot you should specify labels for all three axes. If you could get away with specifying labels for only two of the axes in older versions of Mathematica, that was a bug that has been fixed. The form with all three elements specified works as you would expect.

edited body
Source Link
m_goldberg
  • 108.6k
  • 16
  • 107
  • 263

There is no reason not to use the option AxesStyle -> 40. AxesStyle1 affects the axes labels and in a style specification an integer is taken as a point size specification. But if you give the point size specification in AxesStyleAxesStyle affects the axes labels and in a style specification an integer is taken as a point size specification. But if you give the point size specification in , you don't need to repeat it in AxesStyleAxesLabel`, you don't need to repeat it in AxesLabel.

So you can use simple form.

Block[{x, p}, rho[n_][x_, p_] = With[{h = 1, H = (1/2)*(p^2 + x^2)}, (1/Pi) (-1)^n Exp[-2 H/h] LaguerreL[n, 4 H/h]]]; ImageCrop[ Plot3D[rho[0][x, p], {x, -5, 5}, {p, -5, 5}, PlotPoints -> 100, PlotRange -> All, ImageSize -> 800, AxesLabel -> {x, p, None}, AxesStyle -> 40, Boxed -> False, TicksStyle -> 20, PlotTheme -> "Classic"]] 

plot

This image was made in V11.0.1.

There is no reason not to use the option AxesStyle -> 40. AxesStyle1 affects the axes labels and in a style specification an integer is taken as a point size specification. But if you give the point size specification in AxesStyle, you don't need to repeat it in AxesLabel`.

So you can use simple form.

Block[{x, p}, rho[n_][x_, p_] = With[{h = 1, H = (1/2)*(p^2 + x^2)}, (1/Pi) (-1)^n Exp[-2 H/h] LaguerreL[n, 4 H/h]]]; ImageCrop[ Plot3D[rho[0][x, p], {x, -5, 5}, {p, -5, 5}, PlotPoints -> 100, PlotRange -> All, ImageSize -> 800, AxesLabel -> {x, p, None}, AxesStyle -> 40, Boxed -> False, TicksStyle -> 20, PlotTheme -> "Classic"]] 

plot

This image was made in V11.0.1.

There is no reason not to use the option AxesStyle -> 40. AxesStyle affects the axes labels and in a style specification an integer is taken as a point size specification. But if you give the point size specification in AxesStyle, you don't need to repeat it in AxesLabel.

So you can use simple form.

Block[{x, p}, rho[n_][x_, p_] = With[{h = 1, H = (1/2)*(p^2 + x^2)}, (1/Pi) (-1)^n Exp[-2 H/h] LaguerreL[n, 4 H/h]]]; ImageCrop[ Plot3D[rho[0][x, p], {x, -5, 5}, {p, -5, 5}, PlotPoints -> 100, PlotRange -> All, ImageSize -> 800, AxesLabel -> {x, p, None}, AxesStyle -> 40, Boxed -> False, TicksStyle -> 20, PlotTheme -> "Classic"]] 

plot

This image was made in V11.0.1.

Source Link
m_goldberg
  • 108.6k
  • 16
  • 107
  • 263

There is no reason not to use the option AxesStyle -> 40. AxesStyle1 affects the axes labels and in a style specification an integer is taken as a point size specification. But if you give the point size specification in AxesStyle, you don't need to repeat it in AxesLabel`.

So you can use simple form.

Block[{x, p}, rho[n_][x_, p_] = With[{h = 1, H = (1/2)*(p^2 + x^2)}, (1/Pi) (-1)^n Exp[-2 H/h] LaguerreL[n, 4 H/h]]]; ImageCrop[ Plot3D[rho[0][x, p], {x, -5, 5}, {p, -5, 5}, PlotPoints -> 100, PlotRange -> All, ImageSize -> 800, AxesLabel -> {x, p, None}, AxesStyle -> 40, Boxed -> False, TicksStyle -> 20, PlotTheme -> "Classic"]] 

plot

This image was made in V11.0.1.