Multiple 2D plots in 1 3D plot
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have 3 sets of data accross 3 days. In the y direction would be day 1, 2, 3. The x-direction has specific times t. while the Z direction is the intesitiy at time t. No equations just 3 sets of data with time t. See below for example of the data.
t is the time. BY is day 1's intensities, CY is day 2's intensities, and DY is day 3's intensities.
In the end I want the data to look like the example from orgin attached as a figure.
Thank you, I have tried many different things but cannot quite figure out how to get plot3 to work out.
t=[1
2
3
4
5
6
7
8
9];
BY = [4925
4564
4356
4245
3701
3662.5
3510.5
3520.5
3342];
CY = [4865.875
4657.5
4474
4221.5
4079.75
3907
3700.5
3579.25
3460.375];
DY = [421.125
416.625
446.25
423.875
429.25
398.75
379.875
374.5
357.25
340
343.25
338.625];
2 commentaires
Réponse acceptée
dpb
le 22 Fév 2021
Well, your data look nothing at all like those in the sample plot and your vectors aren't of commensurate lengths, but--
plot3(t,ones(numel(t),2).*[0 1],[BY,CY]);
grid on
t1=1:numel(DY);t1=t1.';
hold on
plot3(t1,ones(size(t1)).*[2],[DY])
ylim([-0.5 2.5])
yticks(0:2)
set(gca,'YTickLabel',num2str([0:2].','Day %d'))
results in
It takes rotating around to get the orientation from default and will need cleaning up, but that's the basis to get the data on a 3D grid.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Visual Exploration dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!