Effacer les filtres
Effacer les filtres

using hist3 to plot 2 different categories of data with two different colorbars

4 vues (au cours des 30 derniers jours)
Hello,
I have two different variables a and b and I want to create a density map with them. I have been trying to use the projection in the x-y plane of hist3 and using a colorbar as my z (frequency of the histogram). The X-axis would be given by my variable a and the Y-axis by my variable b. The problem with this is that I have two categories of data and I want a different colorbar for each of them. Let's say that I want color blue for category alfa and color red for my category beta. How can I do that? Of course, there are some bins where both colors would overlap but that's totally fine. I will play with the transparency. If there is any other function which does it let me know, it doesn't need to be hist3, I also played with pcolor and hist2D

Réponses (1)

Ganesh Regoti
Ganesh Regoti le 1 Août 2019
I think axesm function of Mapping Toolboxwould be helpful. You need to plot the data separately based on the categories and overlap it on the same figure. There is one similar question answered and here is the link

Catégories

En savoir plus sur Data Distribution Plots dans Help Center et File Exchange

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by