Code covered by the BSD License
-
connect_the_dots(logical_matr...
Connects isolated "true" points with others in the same column.
-
data2norm(points, axes_handle...
Translates data units to normalized units.
-
hist2d (mX, vYEdge, vXEdge)
-
isbetween(a, b, c, varargin)
-
legend_best_fit(varargin)
Moves the legend around to avoid covering data with legend.
-
nice_step_size(raw_num, raw_n...
step_size = nice_step_size(raw_num, [raw_num_upper])
-
nice_tics(numerical_range, va...
tics = nice_tics(numerical_range, 'limits', limits)
-
num_dims(X)
Returns the number of dimensions of matrix X; like "ndims" but will report a 1 X m vector as having one dimension.
-
stretch_plot_limits(limits_ve...
Stretches limits by specified factor.
-
string_present(string_to_sear...
syndrome = string_present(string_to_search, pattern_cell, [collapse])
-
View all files
Legend best fit
by Kevin J. Delaney
29 Jan 2011
(Updated 01 Feb 2011)
Automatically moves legend around inside plot to avoid covering the plotted lines.
|
Watch this File
|
| File Information |
| Description |
legend_best_fit automatically positions the existing legend inside the axes to avoid covering the plotted data. I think it does a better job than the "Location", "Best" option in "legend" command.
Example:
legend_best_fit(axes_handle)
Will position legend inside if it can, return false if it can not.
legend_best_fit(axes_handle, 'adjust y limits', true)
Positions legend if it can with existing y axis limits. If not, slightly expands y axis limits & tries again.
legend_best_fit(axes_handle, 'location', preferred_location)
Tries your preferred location (like "NorthEast", etc.) first. |
| MATLAB release |
MATLAB 7.11 (2010b)
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Comments and Ratings (1) |
| 29 Jul 2011 |
Kevin
|
|
|
| Updates |
| 31 Jan 2011 |
Utility program ("nice_tics") now handles limits that straddle the origin. |
| 01 Feb 2011 |
Bug fixes |
|
Contact us at files@mathworks.com