Skip to content
This repository was archived by the owner on Apr 5, 2019. It is now read-only.

Commit 043d85e

Browse files
committed
Temporarily deprecate append & remove for MATLAB >= R2018a
1 parent d8fb85e commit 043d85e

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

Readme.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ The legend will only be updated with the new strings if the number of strings in
6464
#### Description
6565
Rearrange the entries of the specified `Legend` object, `legendhandle`, so they are in the order specified by the vector `newOrder`. `newOrder` must be the same length as the number of legend entries in `legendhandle`. All elements of order must be unique, real, positive, integer values.
6666

67+
**NOTE**: `legtools.append` is currently unsupported for MATLAB >= R2017a
68+
6769
#### Example
6870
% Sample data
6971
x = 1:10;
@@ -89,6 +91,8 @@ If `removeidx` specifies all the legend entries the `Legend` object, `legendhand
8991

9092
If a legend entry to be removed is one generated by `legtools.adddummy`, its corresponding Chart Line Object will also be deleted.
9193

94+
**NOTE**: `legtools.remove` is currently unsupported for MATLAB >= R2017a
95+
9296
#### Example
9397
% Sample data
9498
x = 1:10;

legtools.m

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,13 @@ function permute(lh, order)
9696
% real, positive, integer values.
9797
legtools.verchk()
9898

99+
% Temporarily throw an error for MATLAB >= R2017a
100+
if ~verLessThan('matlab', '9.2')
101+
error('legtools:permute:NotImplementedError', ...
102+
'legtools.permute is currently not functional in MATLAB >= R2017a', ...
103+
)
104+
end
105+
99106
if ~exist('order', 'var') || isempty(order)
100107
error('legtools:permute:EmptyOrderInput', ...
101108
'No permute order provided' ...
@@ -134,6 +141,13 @@ function remove(lh, remidx)
134141
% object is deleted
135142
legtools.verchk()
136143
lh = legtools.handlecheck('remove', lh);
144+
145+
% Temporarily throw an error for MATLAB >= R2017a
146+
if ~verLessThan('matlab', '9.2')
147+
error('legtools:remove:NotImplementedError', ...
148+
'legtools.remove is currently not functional in MATLAB >= R2017a', ...
149+
)
150+
end
137151

138152
% Catch length issues, let MATLAB deal with the rest
139153
if numel(unique(remidx)) > numel(lh.String)

0 commit comments

Comments
 (0)