# How can I get the color 'black,grey and white' in Mathematica? [closed]

I'm drawing a density plot,and I used the command of 'ColorFunction',but failed to get the color 'black,grey and white' as the paper.The pictures are as follows:

## closed as off-topic by Bob Hanlon, Carl Lange, m_goldberg, Henrik Schumacher, LouisBMay 19 at 20:43

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Bob Hanlon, Carl Lange, m_goldberg, Henrik Schumacher, LouisB
If this question can be reworded to fit the rules in the help center, please edit the question.

• What did you try? It should be simple as ColorFunction -> GrayLevel. – C. E. May 19 at 2:10
• ColorConvert[..., "Grayscale"] – AccidentalFourierTransform May 19 at 2:11
• Oh,right!Thanks. – KarryMa May 19 at 2:16

You can use the option ColorFunction.

Here is an example taken from the documentation of DensityPlot

DensityPlot[y + Sin[x^2 + 3 y], {x, -3, 3}, {y, -3, 3}, ColorFunction -> GrayLevel]


• Yeah,I got it.Thanks. – KarryMa May 19 at 2:27
• And one more question: How to set the coordinate interval? – KarryMa May 19 at 2:31
• @KarryMa. That's new question as should be posted as such. – m_goldberg May 19 at 2:47

I often use PlotTheme -> "Monochrome" for all kinds of plots :

DensityPlot[y + Sin[x^2 + 3 y], {x, -3, 3}, {y, -3, 3},
PlotTheme -> "Monochrome"]