Home > front end >  Combining properties of pcolormesh and imshow
Combining properties of pcolormesh and imshow

Time:09-13

An advantage of enter image description here

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:

I found Output of the code

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:

enter image description here

Now... taking @kwinkunks answer directly produced the following plot:

enter image description here

...where the axes tickmarks are now as they should be! Amazing!

  • Related