Axis scaling in matlab -
i trying set plot axes "tight" using following simple command in matlab-
axis tight
which can done using-
axis([xmin xmax ymin ymax])
but doing this, found few data points falling on top of axes can see here: https://docs.google.com/file/d/0b6gung-8d30vauhvqvfoatjkc1e/edit?usp=sharing
however, when generate same figure without tight command, looks worse because space on both sides may see here: https://docs.google.com/file/d/0b6gung-8d30vz0jzr0jzymhievu/edit?usp=sharing
i know if there's function in matlab me represent scatter plot close tight scenario without letting of data points falling on of axis. say, 5% space on sides. thanks.
you provide space manually:
[xmin, xmax] = xlim; [ymin, ymax] = ylim; x_tol = (xmax-xmin)*0.05; %(5%) tolerance y_tol = (ymax-ymin)*0.05; %(5%) tolerance axis([xmin-x_tol xmax+x_tol ymin-y_tol ymax+y_tol])
Comments
Post a Comment