I'm trying to plot matrix data from an Excel file, but the plot I obtained (named "2") doesn't match my expected result (named "1"); here's my code—can anyone assist?

2 ビュー (過去 30 日間)
I am trying to plot my matrix data from an excel file. However, what I obtained is the same as what I desired. The expected plot is name 1, while what I have obtained is named 2. Here is my code:
% Load the matrix from the Excel sheet
matrix1 = readmatrix('Sample_Axes.xlsx', 'Sheet', 'one');
% Create a figure with subplots
figure;
% Plot matrix1 using contour
subplot(1, 3, 1);
contourf(matrix1, 20, 'LineColor', 'none'); % 20 contour levels, 'LineColor', 'none' for no contour lines
cb1 = colorbar;
colormap jet;
title('Matrix 1');
Can someone help me out?
  8 件のコメント
Mathieu NOE
Mathieu NOE 2024 年 8 月 27 日
this is the posted reference image
imshow('pict.png')
- we can clearly see the colorbar having a kind of log (signed) scale (can be interpreted as a "transformation" if you prefer) - to emphasize the rendering of low amplitude details around zero , which is the exact same topic addressed in the link I provided above (symmetric (diverging) logarithmic color map/scale)
Oluwasogo
Oluwasogo 2024 年 8 月 28 日
Thank you @Mathieu NOE and @dpb . I got the plot now. The suggestions worked.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeOrange についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by