Colormap utility - two axes in colorbar
Mostra commenti meno recenti
Hi everyone,
I have a query regarding the colormap utility and plotting two variables using one colormap and one colorbar, the latter of which would have two axes for each variable. To accompany the more detailed query description below, please see the image attached.

I have two variables that are related to eachother (let's say A and B) where A = xB where 'x' is a unitless constant value (let's say it's 2.98 for every case). Therefore, A and B have the same units.
I would like to use a single colormap for both variables since 'x' is the variable that couples between one and the other. Now, where the right tick axis says B = 6, the left tick axis would have A equal to 17.88 which doesn't look good as a tick value. Instead I would like it to have ticks at location 18, which would have to be slightly higher up in the colorbar than 6 (see image attached). Same for the other values.
The image attached shows what I would like to code. Is this possible?
Thank you.
Risposta accettata
Più risposte (1)
Prasobhkumar P. P.
il 19 Ago 2020
0 voti
Thank you dpb. The connection between 2 axes are achieved using updated version of your code.
https://in.mathworks.com/matlabcentral/fileexchange/79295-multiple-axes-colorbar
Categorie
Scopri di più su Creating, Deleting, and Querying Graphics Objects in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


