Multiple Images on one plot
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
In an attempt to create another heatmap, I am not sure how to plot multiple data sets on one graph with image. I have tried to use 'hold on', 'hold(im.Parent)', and adding an xlim to create the graph, but all failed attempts. Do I have to create a for-loop in order to plot multiple data sets on one image I am creating?
Thank you.
0 commentaires
Réponses (1)
Walter Roberson
le 22 Mai 2018
You can use
hold on
If you want to plot the images in different positions, pass the XData and YData parameters to the image() call.
However, the image drawn last will hide any image underneath it completely unless you pass AlphaData to the image() call to enable transparency. Remember that the effects of AlphaData are cumulative, so if you had (say) two 50% transparent images underneath the top 50% transparent image, then the bottom image would be contributing only 1/8th to the final result, as if you had background/8 + bottom/8 + middle/4 + top/2
I do not think you are going to be able to construct a useful heatmap using this technique.
You might want to have a look in the File Exchange at https://www.mathworks.com/matlabcentral/fileexchange/31726-data-density-plot
2 commentaires
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!