I have a figure with 2 subplots, and I'd like to set the axis labels. I have assigned the handles P1 and P2 to the two subplots, e.g.
P1 = subplot(2,1,1);P2 = subplot(2,1,2);
After plotting my data, I can do things like:
set(P1, 'YLim', [0 2])
but when I try changing the xlabel,
set(P1, 'Xlabel', 'This is the X label')
I get an error:
??? Error using ==> set Value must be a handle
I've tried changing case 'xlabel' and a few other things, but the documentation wasn't any help. Any ideas?
Best Answer