グラフと写真を合わせる

7 Ansichten (letzte 30 Tage)
takuyuki hasegawa
takuyuki hasegawa am 20 Sep. 2020
Beantwortet: Atsushi Ohashi am 25 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])

Antworten (1)

Atsushi Ohashi
Atsushi Ohashi am 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];

Kategorien

Mehr zu グラフィックス出力のターゲットの指定 finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!