I am developing code to display two animated side-by-side pressure maps. The pressure maps are 16 x 16 (interpolated to 76 x 76) and are displayed using "surf" repeatedly, as I loop through the frames.
I have allowed two options in the UI. With the independent axes option, the Z axis of each display runs from 0 to 1.1 * the maximum pressure of any element of any frame in that data set. With the linked axes option, I use the maximum value of either data set to set the z axis extents for both data sets. My intention was to have the independent mode fill both data spaces to the maximum, whereas the linked mode allows me to compare like with like.
The color mapping doesn't behave as I expected in linked mode though. The color map range seems to depend on the data range, and not on the Z axis range. This means that the same pressure appears as different colors on the two linked axes displays.
How do I fix this (have the color map range determined by the axes range)?