Plotting data on a 2d plane with colorbar
조회 수: 35 (최근 30일)
Lessmann 2015년 10월 15일
an easy way of doing this is the scatter plot. Use it like this
Martin Schätz 2015년 10월 15일
Hey, in pcolor the X and Y means predefined grid (like from meshgrid ), and Z are actual data. So then X Y and Z has to be matrixes. If you have 1D X and Y and 2D Z then you can use meshgrid to generate 2D X and Y and use pcolor . If you had 1D Z, or all of your X Y Z are actual depth data, then you will have to display them as 1D data, or expand them to actual 2D array, create grid for them and use pcolor to display them. (And display colorbar as u did write in your answer.) Also check examples for pcolor they might help you to understad how this function works.