%This script exposes a "bug" that allows a unwanted axes to be created %when creating lines in specific axes %graphics_toolkit('qt'); %fltk also produces error hf1=figure; %This figure should not ever be drawn into ht1=uicontrol(hf1,'style','text','units','normalized','string','Unwanted axis will show up here','Position',[.2 .9 .6 .11]); hf2=figure; ht2=uicontrol(hf2,'style','text','units','normalized','string','Figure with Graph','Position',[.2 .9 .6 .11]); hax=axes(hf2); %Make figure 1 active figure(hf1); %Plot a line into the axes hl=line(hax,[1 10],[2 8]); %Should only plot into axes on fig 2 disp('Note the axis that was created in Figure 1');