/
hold_on.m
executable file
·52 lines (45 loc) · 1.19 KB
/
hold_on.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
function wasHold = hold_on
%% Holds on and returns previous status
% Usage: wasHold = hold_on
% Explanation:
% TODO
%
% Example(s):
% wasHold = hold_on;
% hold_off(wasHold);
%
% Outputs:
% wasHold - whether the current axes was held on
% specified as a logical scalar
%
% Used by:
% cd/compare_events_pre_post_stim.m
% cd/create_plot_movie.m
% cd/plot_autocorrelogram.m
% cd/plot_ball_stick.m
% cd/plot_chevron.m
% cd/plot_correlation_coefficient.m
% cd/plot_grouped_histogram.m
% cd/plot_grouped_jitter.m
% cd/plot_grouped_scatter.m
% cd/plot_selected.m
% cd/plot_spectrogram.m
% cd/plot_spike_density_multiunit.m
% cd/plot_traces.m
% cd/plot_tuning_curve.m
% cd/plot_vertical_line.m
% File History:
% 2019-10-02 Created by Adam Lu
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Do the job
if ~ishold
wasHold = false;
hold on
else
wasHold = true;
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%{
OLD CODE:
%}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%