The problem becomes immediately obvious: imshow (on the left) is capable of representing the 3D array, but its axis are scaled wrong, leading to a distorted representation. pcolormesh (on the right), on the other hand, can not represent the 3D array (hence why I plot all three channels separately), but is capable of applying the axis correctly, leading to no distortion.
How can I combine these properties?
CodePudding user response:
CodePudding user response:
@kwinkunks answer is the method that solved my problem:
The original data, using imshow
, looked like this, where both the x- and y-axis of the data plot and the colorbar are wrong. Of all 4 axes, only the data y-axis is linear, the 3 other axes are non-linear, and so using imshows
's extent
option is no good:
Now... taking @kwinkunks answer directly produced the following plot:
...where the axes tickmarks are now as they should be! Amazing!