3D plot including different colors

8 次查看(过去 30 天)
Hi,
I'd like to create a 3-D Chart and be able to manipulate the axis in order to see the Dates. the code I completed so far is the following:
myDates=[735845;735846;735847;735850;735851;735852;735853;735854]
stock1=[100;98;102;110;108;122;140;145]
stock2=stock1.*1.1;
stock3=stock2.*1.2;
myStocks=[stock1 stock2 stock3];
myData=[myDates stock1 stock2 stock3]
surf(myStocks)
What I am doing is plotting 3 different stock Price paths and I would like to add the corresponding date on the x-axis and in Addition, be able to rotate the Chart, so that the first line of the plane is stock1, then stock2 and one in the back is stock3. I would also like to have the first value of stock1 on the left side and the last value on the right side so the curve is upward sloping from left to right in this case and also from front to back.
thanks a lot for your supprt.

采纳的回答

Star Strider
Star Strider 2014-11-16
Locks, meet ribbon:
myDates=[735845;735846;735847;735850;735851;735852;735853;735854];
stock1=[100;98;102;110;108;122;140;145];
stock2=stock1.*1.1;
stock3=stock2.*1.2;
stox = [stock1 stock2 stock3];
figure(1)
ribbon(myDates,stox)
datetick('y', 'yyyy-mm-dd')
set(gca, 'FontSize',8)
  23 个评论
Locks
Locks 2014-11-23
I tried to make a pdf but it Looks awful. there are some black spots on the graphics, but I will try to find out more about Export_fig.
Thanks a lot for your help!
Star Strider
Star Strider 2014-11-23

My pleasure!

Also, search Kelly Kearney’s answers. She’s dealt with a some of these problems and her posts might yield some clues on how to do what you want.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Time Series Events 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by