Multiple Colormaps with (or without) Transparency
Show older comments
Hello everyone,
I have 2d histogram data which I can plot as in the example below:

But I have several more histograms that I would like to plot on top of this with different colormaps. The idea for each different histogram is to have a different colormap with shades of a different color to distinguish different datasets, but zero should tend to the white for all data. I found a way to define a custom colormap but as I want all histograms within the same plot and each axes only accepts a single colormap, I thought of introducing transparent colors in the new axes objects for the additional histograms I want to plot. How can I do this? I found something about transparent hex codes but I couldn't find how (and if at all) I can have a gradient with transparent colors. I am inserting the dataset that I used to generate the above plot if you would like to play with. The commands for this plot are:
load("2d_hist_data.mat")
imagesc(edges(1),edges(2), counts);
colormap(flipud(bone));
Accepted Answer
More Answers (0)
Categories
Find more on Orange in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
