I'm working on a GUI able to display images and data associated with the latter images.
I have an x,y image, and a function f(x,y) (wich is a contour) and I'd like to show both the image and the contour in one single plot using an axes object.
This is how I get the image showed in the axes :
function aff_toto_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin
imshow(handles.im_ref,'parent',handles.axes1);
Now I get a contour matrix :
[handles.c,handles.h] = contour(handles.coor_y,handles.coor_x,handles.fun,handles.vec_iso);
I'd like to plot these contour lines on the image itself, in handles.axes1.
Does anyone have a clue ?
Thank you all for reading this.
EDIT : For now I'm just tying to plot some random sine over my picture. I tried
imagesc(handles.im_ref,'parent',handles.axes1);
hold(handles.axes1,'on');
plot(handles.axes1,handles.coor_x,sin(handles.coor_x));
hold off;
which shows the picture but the plot remains invisible.
set(handles.axes1,'color','none')
after thesin
plot. That should give you a transparent background - Schorschset(handles.axes1,'color','none')
and the example you gave me I manage to do it. Thank you a lot. - ChocoPouce