Skip to content

Commit 40207e4

Browse files
committed
Fixed set_datetick() axis truncation problem
Users must now specify ‘keepticks’or ‘keeplimits’ options if desired.
1 parent 4fd5b0a commit 40207e4

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
gramm_test.m
33
gramm cheat sheet.numbers
44
.DS_Store
5+
paper/figure.ai

@gramm/draw.m

+2-1
Original file line numberDiff line numberDiff line change
@@ -1176,7 +1176,8 @@
11761176
%Do the datetick
11771177
if ~isempty(obj.datetick_params)
11781178
for dtk=1:length(obj.datetick_params)
1179-
datetick(ca,obj.datetick_params{dtk}{:},'keepticks');
1179+
%Previously used 'keepticks' by default which could cause a truncation of the axes
1180+
datetick(ca,obj.datetick_params{dtk}{:});
11801181
end
11811182
end
11821183

@gramm/set_datetick.m

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
%set_datetick Specify that the x axis has dates
33
%
44
% This function can receive the same optional arguments as the
5-
% datetick() function of matlab
5+
% datetick() function of matlab. In gramm versions before March 2018 the
6+
% behavior was to force the 'keepticks' options. Now the options
7+
% 'keepticks' or 'keeplimits' must be specified.
68

79
%This way we can handle multiple calls to set_datetick
810
for obj_ind=1:numel(obj)

paper/paper.pdf

358 KB
Binary file not shown.

0 commit comments

Comments
 (0)