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
채택된 답변
Walter Roberson
2012년 4월 23일
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.
댓글 수: 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!