Search code examples
plotmatlab-figure

How to draw the following 3D Matlab plot/graph?


I am working on a data analytics project as part of my result. I have cleaned and sorted my data as I wanted.

I want to show the data as shown in the figure below. I have multiple files. Each file represents a single day and the date in each file is hour and activity (as shown in the picture).

I am working in Matlab, I know how to do the 3D graphs. I also know about the ribbon function in Matlab. But I can't exactly figure out how to draw the following graph. Any assistance will be highly appreciated. Thank you.

enter image description here


Solution

  • If you still haven't solved the issues, you can use ribbon plot in matlab. Please find the details in the following link.

    https://www.mathworks.com/help/matlab/ref/ribbon.html

    For example, if X is the vector containing all the data, then you can simply write.

    ribbon(X(:,1));