plot3() cannot do it, not by itself. Each lineseries object that it generates must be a single color. You can break the series into shorter lines each of a constant color. If you want any one line segment to shade between colors, then you need to replace the lines with very thin patch() objects; I know people have posted code for that, but I've lost track of the posting.
Multicoloring a 3-D plot
2 次查看(过去 30 天)
显示 更早的评论
I'm making a 3-d plot with the plot3() command. However my plot is essentialy going to be for a chaotic double pendulum. in short, it's going to be an absolute mess. To help simplify where each curve is going, I've decided to color code the line so it starts at blue and makes it's way through the spectrum to red.
Does anyone know of a way to make a plot line continuously change color? I know there are other 3-d graphs with this option but I'm really trying to get one for plot3().
Thanks a lot.
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graphics Object Properties 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!