Effacer les filtres
Effacer les filtres

グラフと写真を合わせる

5 vues (au cours des 30 derniers jours)
takuyuki hasegawa
takuyuki hasegawa le 20 Sep 2020
以下のコードで背景に写真を載せ、グラフと重ねようとしているのですが、写真の位置が正しい位置に出ないかつ圧縮されています。
解決策ありましたらお願いします
BackImName='RectifiedPhotos/Photo3/RectifiedPhoto-H2018-02-17-003.png';
file=csvread('modifieddm=1.csv');
figure
for i=2
a=file(:,1);
plot(a,file(:,i));
hold on
end
hold on
I = imread(BackImName);
h = image(xlim,-ylim,I);
uistack(h,'bottom');
xlim([0 2400])
ylim([100 1600])

Réponses (1)

Atsushi Ohashi
Atsushi Ohashi le 25 Sep 2020
Line関数で画像上にプロットを描く手段はいかがでしょうか。
BackImName='RectifiedPhotos/Photo3/RectifiedPhoto-H2018-02-17-003.png';
file=csvread('modifieddm=1.csv');
figure;
img = imread(BackImName);
imshow(img);
ax = gca;
h = line(ax, file(:, 1), file(:, 2));
% ラインが目立つよう色を変更しております
h.Color = [1, 0, 1];

Catégories

En savoir plus sur グラフィックス出力のターゲットの指定 dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!