gpt4 book ai didi

wolfram-mathematica - Mathematica中地 block 的标准颜色是什么?

转载 作者:行者123 更新时间:2023-12-03 11:47:40 25 4
gpt4 key购买 nike

(注:,此问题的所有答案均适用于版本10之前的Mathematica版本。有关版本10及更高版本,请参见https://mathematica.stackexchange.com/questions/54486/how-to-access-new-colour-schemes-in-version-10https://mathematica.stackexchange.com/questions/54629/what-are-the-standard-colors-for-plots-in-mathematica-10。)

Mathematica 中使用 ListPlot 命令时,将选择某些默认颜色。

由于某些报告中的一致性,我想将它们与PlotStyle选项一起使用。原来,我无法使用pre-defined color names复制默认颜色,尽管蓝色和紫色似乎有点接近。

因此,我的问题是:

How can I chose the standard colors used by Mathematica in plots along with PlotStyle?



先感谢您。

不错的答案belisariusSjoerd给出,我们可以得出以下结论:

Plot[Sin[x], {x, 0, 2 Pi}, PlotStyle -> ColorData[1, 4]]



将产生以第四个标准颜色(一些漂亮的绿色)绘制的正弦。

最佳答案

Plot使用的颜色在ColorData[1]中。

比较

Graphics[MapIndexed[{#1, 
Tooltip[Rectangle[{#2[[1]], 0}, {#2[[1]] + 1, 1}], #1]} &,
ColorData[1] /@ Range[40]]]

带有 Belisarius'颜色
Graphics[MapIndexed[{#1, 
Tooltip[Rectangle[{#2[[1]], 0}, {#2[[1]] + 1, 1}], #1]} &,
Cases[ListPlot[Table[{i}, {i, 40}]], Hue[x__], Infinity]]]

它们是相同的,除了一个是 Hue术语,另一个是 RGBColor术语

关于wolfram-mathematica - Mathematica中地 block 的标准颜色是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5391825/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com