Why am I unable to insert a line in a plot in MATLAB when setting the DefaultAxesUnits property of the root to something other than 'normalized'?
I am using the following code:
figureplot(1:10)set(gcf,'defaultaxesunits','normalized')
After running this code, I click on the 'Insert Line' button in the figure toolbar. I can draw a line in the axes and I am able to see it. But, if I repeat the same code to set the DefaultAxesUnits property to anything other than 'normalized' (i.e inches,centimeter,points,pixels or characters) and draw the line by clicking the 'Insert Line' button, I cannot see the line in the axes.
However, if I use the FINDALL command
findall(gcf,'type','line')
I am able to see the handle to the line.
If the DefaultAxesUnits property is set to 'inches' and if I try to draw the line very close to the origin in the axes, I am able to see very small section of the line. With other property values, I cannot do even this.
Best Answer