开发者

DensityPlot command in mathematica

开发者 https://www.devze.com 2023-01-11 06:09 出处:网络
The info for DensityPlot says that the \"default generates colorized grayscale output, in which larger values are shown lighter.\" What on earth is c开发者_JAVA百科olorized grayscale? Is there a way t

The info for DensityPlot says that the "default generates colorized grayscale output, in which larger values are shown lighter." What on earth is c开发者_JAVA百科olorized grayscale? Is there a way to make it truly grayscale without the blue and purple colors that it generates? And when I do it, it appears a little pixellated. Is there a way to evaluate it at more points so that it doesnt look so choppy?


By colorized grayscale, I think they mean that it's monochrome, or maybe bichromatic - that is, there's a linear scale from one color to another, rather than fully varying across the whole color space. It's not a very good term, I agree.

Specifying ColorFunction->GrayLevel should give you pure grayscale. This is distinct from the built-in gradient GrayTones (ColorFunction->"GrayTones"), which appears to stop a bit short of pure black and white on the ends and is a bit warm. There are plenty of other built-in gradients - see the return value of ColorData["Gradients"]. You can also specify your own function, of course - it will take as input a real number from 0 to 1, and should return a color specification, e.g. the return values of GrayLevel, RGBColor, Hue, or CMYKColor.

To make it less choppy, as with basically all plotting functions, try specifying a higher value for PlotPoints (the number of initial sampling points) or MaxRecursion (how many times it can resample).

0

精彩评论

暂无评论...
验证码 换一张
取 消