I have a GUI where upon generation a blank plot is generated with AX, H1, and H2 handles
As data is read by reading files obtained from UIGETFILE, I need the GUI to plot them on the existing graph (axes1)
The issue I face now is when I add a plot to the current figure, the x axis doesn't update.
here's what I have:
[AX, H1, H2] = plotyy(0,0,0,0);
set(get(handles.axes1, 'xlabel'),'string', 'Time');
hold(AX(1),'on');
hold(AX(2),'on');
set(AX(1),'YColor',rgb('black'),...
'XLimMode','auto',...
'YLim',[0 25],...
'YTick',(0:5:25));
set(AX(2),'ycolor',rgb('black'),...
'XLimMode','auto',...
'YLim',[0 100],...
'YTick',(0:10:100));
datetick(AX(1));
datetick(AX(2));
newgraph1 = plot(AX(1),x,y)
set(newgraph1,'color', [1 1 1])
my newgraph1 plot won't display on the figure, because the initialization of the "blank graph" set the xlim to [-1 1]. When I use get(AX(1)) to see the values, it shows that the 'XLimMode' is set to 'manual' again even though I had originally changed it to 'auto'
Any help is much appreciated, thanks :)