Wolfram mathematica 在Mathematica中使用给定颜色设置给定列表图的所有点
我怎样才能使它能够实现以下功能Wolfram mathematica 在Mathematica中使用给定颜色设置给定列表图的所有点,wolfram-mathematica,Wolfram Mathematica,我怎样才能使它能够实现以下功能 ListPointPlot3D[points, PlotStyle -> PointSize[0.05]]; 例如,我看到的点是绿色或黄色,而不是典型的深蓝色 谢谢编辑,我给你以下两种可能的解决方案。尽管如此,请注意@Yaroslav的代码要好得多 f[x_, y_] := x^2 + y^2; t = Graphics3D[{PointSize[Large], Red, Point@ Flatten[Table[{x, y, f[x, y]}
ListPointPlot3D[points, PlotStyle -> PointSize[0.05]];
例如,我看到的点是绿色或黄色,而不是典型的深蓝色
谢谢编辑,我给你以下两种可能的解决方案。尽管如此,请注意@Yaroslav的代码要好得多
f[x_, y_] := x^2 + y^2;
t = Graphics3D[{PointSize[Large], Red, Point@
Flatten[Table[{x, y, f[x, y]}, {x, 0, 10, 1}, {y, 1, 2, 1}], 1]}];
b = Plot3D[f[x, y], {x, -10, 10}, {y, -10, 10},
ColorFunction -> "MintColors"];
Show[{b, t}]
或
使用
指令
组合样式,即
ListPointPlot3D[points, PlotStyle -> Directive[{PointSize[0.05], Green}]]
有时我发现以下方法很有用,因为它允许我 操纵打印符号(PlotMarkers似乎不适用于ListPointPlot3D, 至少在Mathematica 7中[最初由Jens Peer Kuska提出]:
ListPointPlot3D[{{1,1,1},{2,2,2},{3,3,3}}]/.Point[xy_]:>(Style[Text["\[FilledUpTriangle]",#],Red,FontSize-> 20]&/@xy)
ListPointPlot3D[{{1,1,1},{2,2,2},{3,3,3}}]/.Point[xy_]:>(Style[Text["\[FilledUpTriangle]",#],Red,FontSize-> 20]&/@xy)