How can I plot multichannel data in 2d plot like attached image.
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
aamir irshad
le 17 Juin 2018
Commenté : Ameer Hamza
le 18 Juin 2018
On x_axis I have different 128 channels. On left y_axis I have input signal and on right y_axis I have colorbars corresponding to output data. Actually output is represented as color information.
0 commentaires
Réponse acceptée
Ameer Hamza
le 17 Juin 2018
Modifié(e) : Ameer Hamza
le 17 Juin 2018
You can obtain something similar using pcolor(). For Example
[x, y] = meshgrid(1:128, 0:70); % 2d meshgrid
z = sort(rand(size(x))); % sample data, use your own variable
p = pcolor(x,y,z);
p.EdgeAlpha = 0;
colorbar;
I am using random data points therefore it does not look the same as your image. Note that to display white color on the plot, the corresponding element in z variable must be inf.
3 commentaires
Ameer Hamza
le 18 Juin 2018
You are welcome. Also thanks for correcting the mistake and attaching a real example. This might help someone in the future.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Line Plots 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!