# The default PlotStyle for Plot3D and how to replace the color

I would like to know the default PlotStyle for Plot3D. Below are two codes, one is the default setting and another is my setting.

Default:

Plot3D[{z=1/2(x^2+y^2), z=x^2+y^2, z=2(x^2+y^2), z=3(x^2+y^2)},
{x,-1,1}, {y,-1,1}, Mesh->None] My:

Plot3D[{z=1/2(x^2 + y^2), z=x^2+y^2, z=2(x^2+y^2), z=3(x^2+y^2)},
{x,-1,1}, {y,-1,1}, Mesh->None,
PlotStyle -> {ColorData[97, "ColorList"][], ColorData[97, "ColorList"][],
ColorData[97, "ColorList"][], ColorData[97, "ColorList"][]}] I know there should be some other settings in the default style, such as Specularity. I want to use the default style except that use different colors or change the order of default colors.

• Method /. ChartingResolvePlotTheme[\$PlotTheme, Plot3D] -- look for the default plot style. Also search the site for ResolvePlotTheme to find many examples of its use. – Michael E2 Apr 28 '18 at 19:14
• defaultplotstyle= "DefaultPlotStyle"/.(Method/. ChartingResolvePlotTheme[Automatic, Plot3D]) – kglr Apr 28 '18 at 19:19

### Default PlotStyle

defaultplotstyle = "DefaultPlotStyle" /.
(Method /. ChartingResolvePlotTheme[Automatic, Plot3D]) p1 = Plot3D[{1/2 (x^2 + y^2), x^2 + y^2, 2 (x^2 + y^2), 3 (x^2 + y^2)},
{x, -1, 1}, {y, -1, 1}, Mesh -> None, ImageSize -> 300];
p2 = Plot3D[{1/2 (x^2 + y^2), x^2 + y^2, 2 (x^2 + y^2), 3 (x^2 + y^2)},
{x, -1, 1}, {y, -1, 1}, Mesh -> None, ImageSize -> 300, PlotStyle -> defaultplotstyle];
Row[{p1, p2}] ### and how to replace the colors

I want to use the default style except that use different colors or change the order of default colors

To use a different set of colors, say, RandomSample[ColorData[43, "ColorList"]] with the same Lighting and Specularity settings as the default style, you can modify defaultplotstyle as follows:

newcolors = RandomSample[ColorData[43, "ColorList"]][[;;4]];
newplotstyle = defaultplotstyle[[;;4]];
newplotstyle[[All, 2]] = newcolors;


Using PlotStyle -> newplotstyle gives To change the order of colors, use, say, PlotStyle -> defaultplotstyle[[{2, 1, 4, 3}]]` to get 