Can I make a plot (colormap) like this?
4 views (last 30 days)
Show older comments
Nisar Ahmed on 30 Sep 2022
Commented: Jeffrey Clark on 1 Oct 2022
Can I plot like this, any function or package plz?
imagesc([1:ntr], Time(:,1), PhiTime)
colorbar; ylabel('Time (s)');set(gca, 'XTickLabel', ); title('Porosity (true model)'); caxis([0.05 0.3]); colormap('jet');
Jeffrey Clark on 1 Oct 2022
@Nisar Ahmed, so you are asking how to create PhiTime yourself, which is simply a matrix of size [1:ntr] by Time(:,1) of values within (or truncated at) caxis([0.05 0.3])? It would depend on what dataset you have to work from, which probably has less or more points than you want in PhiTime. I suspect what appears to be lines in the image are all actually filled circles of some size indicated by some amplitude which is different from the color selection value you would have in PhiTime. So your dataset must include at least four values for each point; from the perspective of the plot something that maps to: horizontal, vertical, color and intensity? So you would loop thru your dataset and index into your matrix to create filled circles of radius intensity and values of the max of whatever is already in the matrix and the color.
Find more on Colormaps 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!