spatial distribution plot in matlab
10 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I am new in matlab, and currently i want to plot some data in my plot. but i am unable to do this, I want to make a plot like this
i have temperatureData
size of temperatureData = 46 x 241 x 4
in y axis i will show 46 point, x axis 241 point, i need 4 plot for last 4 data. is it possible to make this graph with this data, or i need to modify my data,
if i can , how to do this, please help.
1 Commento
Risposte (1)
Rahul
il 5 Set 2024 alle 5:44
I understand that you have some 'temperatureData' of size 46 x 241 x 4. You want to plot the 'temperatureData' in the way shared by you in the question above.
You can achieve the desired result by following the mentioned code:
figure;
% 'temperatureData' is considered to be a 46 x 241 x 4 matrix as mentioned
% in the question
for i = 1:4
% Extract the 2D slice for the current plot
dataSlice = temperatureData(:, :, i);
subplot(2, 2, i);
contourf(dataSlice, 'LineStyle', 'none');
colorbar;
end
You can also consider using 'imagesc' function instead of the 'contourf' function above for your use-case.
You can refer to the following documentations to know more about these functions and styling:
0 Commenti
Vedere anche
Categorie
Scopri di più su Data Distribution Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!