按列表中点的顺序绘制颜色图 - Mathematica [英] Color Plot by order of points in list - Mathematica

查看:55
本文介绍了按列表中点的顺序绘制颜色图 - Mathematica的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个按时间排序的三维点列表.有没有办法绘制点,以便我可以获得视觉表示,其中还包括有关该点在列表中的位置的信息?我最初的想法是找到一种方法,按照绘制顺序为点着色.

I've got a list of three dimensional points, ordered by time. Is there a way to plot the points so that I can get a visual representation that also includes information on where in the list the point occurred? My initial thought is to find a way to color the points by the order in which they were plotted.

ListPlot3D 将一张纸覆盖在点上,不考虑它们的绘制顺序.

ListPlot3D drapes a sheet over the points, with no regard to the order which they were plotted.

ListPointPlot 只显示点,但没有说明它们的绘制顺序.正是在这里,我正在考虑根据它们在列表中出现的顺序为这些点着色.

ListPointPlot just shows the points, but gives no indication as to the order in which they were plotted. It's here that I am thinking of coloring the points according to the order in which they appear in the list.

ListLinePlot 似乎没有 3D 表亲,与许多其他绘图功能不同.

ListLinePlot doesn't seem to have a 3D cousin, unlike a lot of the other plotting functions.

推荐答案

你也可以这样做

lst = RandomReal[{0, 3}, {20, 3}];
Graphics3D[{Thickness[0.005], 
  Line[lst, 
   VertexColors -> 
    Table[ColorData["BlueGreenYellow"][i], {i, 
      Rescale[Range[Length[lst]]]}]]}]

这篇关于按列表中点的顺序绘制颜色图 - Mathematica的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆