How can I put a custom colorbar into a figure with multiple datasets/datatypes
I have an interesting situation where I am trying to overlay 3 different datatypes and make a custom colorbar for one of them.
For context, it first has and RBG image loaded using imagesc, scaled to lat/lon limits. The colors of the image are supposed to correlate with concentration and this is what I which to display in the color bar (the dark green to bright yellow).
Secondly, it has two contours (contourf): one for the depth contours and one for the coastline. This is overlayed so that it lines up with the RGB image. These contours also have their own colormap
Finally, it has 3 sets of data plotted using just ‘plot’ overtop of that.
I have created a custom color set corresponding to the range of colors in the RGB image, but I need the land and everything else to follow a different colormap. I also need to somehow scale the colorbar output to the corresponding concentrations. Currently, the colorbar only uses the depth data, and changing the colormap changes the colormap of all data sets. I hope the images below make the issue more clear.
I would like the colorbar to have the colors of the first picture, but scaled to the concentrations and not depth. And I would like the rest of the image to look like the second picture.
Thank you in advance! And sorry if this isn’t super clear.
SeanI have an interesting situation where I am trying to overlay 3 different datatypes and make a custom colorbar for one of them.
For context, it first has and RBG image loaded using imagesc, scaled to lat/lon limits. The colors of the image are supposed to correlate with concentration and this is what I which to display in the color bar (the dark green to bright yellow).
Secondly, it has two contours (contourf): one for the depth contours and one for the coastline. This is overlayed so that it lines up with the RGB image. These contours also have their own colormap
Finally, it has 3 sets of data plotted using just ‘plot’ overtop of that.
I have created a custom color set corresponding to the range of colors in the RGB image, but I need the land and everything else to follow a different colormap. I also need to somehow scale the colorbar output to the corresponding concentrations. Currently, the colorbar only uses the depth data, and changing the colormap changes the colormap of all data sets. I hope the images below make the issue more clear.
I would like the colorbar to have the colors of the first picture, but scaled to the concentrations and not depth. And I would like the rest of the image to look like the second picture.
Thank you in advance! And sorry if this isn’t super clear.
Sean I have an interesting situation where I am trying to overlay 3 different datatypes and make a custom colorbar for one of them.
For context, it first has and RBG image loaded using imagesc, scaled to lat/lon limits. The colors of the image are supposed to correlate with concentration and this is what I which to display in the color bar (the dark green to bright yellow).
Secondly, it has two contours (contourf): one for the depth contours and one for the coastline. This is overlayed so that it lines up with the RGB image. These contours also have their own colormap
Finally, it has 3 sets of data plotted using just ‘plot’ overtop of that.
I have created a custom color set corresponding to the range of colors in the RGB image, but I need the land and everything else to follow a different colormap. I also need to somehow scale the colorbar output to the corresponding concentrations. Currently, the colorbar only uses the depth data, and changing the colormap changes the colormap of all data sets. I hope the images below make the issue more clear.
I would like the colorbar to have the colors of the first picture, but scaled to the concentrations and not depth. And I would like the rest of the image to look like the second picture.
Thank you in advance! And sorry if this isn’t super clear.
Sean colormap, colorbar, contour MATLAB Answers — New Questions