using hist3 to plot 2 different categories of data with two different colorbars
조회 수: 4 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
답변 (1개)
Ganesh Regoti
2019년 8월 1일
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
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Distribution Plots에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!