axescenter
Puts axes in the center of a plot. Zooming, panning and some command line manipulations allowed.
Author: Matt Fig
Great idea, two bugs for somebody to fix though:
1) It doesn't seem to work correctly with subplots (i.e. axes don't actually go through the origin)
2) It seems to change the focus from the current axes somehow, so that e.g. calls to xlabel don't work after calling axescenter. However, this is fixed by reselecting the axes.
Excellent! This makes figures look like they do on screen. For those of us who like GUIs, note that this also works if you save figures by clicking File>Save As... and select EPS (which opens in PDF viewers and word processors).
This is great! Just once question. Is there a way to keep the "box" around the figure so as to sort of frame it? Here is my code
function z=graph(x)
a=0.5;
%
xmin=-0.4;
xmax=1.4;
dx=0.01;
%
x=[xmin:dx:xmax];
%
z=x.*(1-x).*(x-a);
%
plot(x,z)
axescenter
Any suggestions would be greatly appreciated. Thanks.
Comment only
16 Feb 2013
axescenter
Puts axes in the center of a plot. Zooming, panning and some command line manipulations allowed.
Comment only