How can I plot a scatter plot over a heatmap ?

I've plotted a heatmap using "imagesc" function and I want to plot a scatter plot over this, how do I do this? The code is shown below, the array "square" is what I've used to plot the heatmap and I want to plot a scatter plot of a 60x2 vector with each column representing the x and y coordinates respectively:
imagesc(square);
axis xy
colormap jet; % Colour scheme of heatmap
colorbar

回答 (1 件)

KSSV
KSSV 2018 年 4 月 3 日

0 投票

Read about hold on

2 件のコメント

Xavier Flores Cabezas
Xavier Flores Cabezas 2020 年 9 月 20 日
hold on doesn't work over colormap
KSSV
KSSV 2020 年 9 月 20 日
OP used imagesc.

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

カテゴリ

ヘルプ センター および File ExchangeData Distribution Plots についてさらに検索

質問済み:

2018 年 4 月 3 日

コメント済み:

2020 年 9 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by