Newer
Older
function [h_axes,h_fig]=create_JRPfig(h,xshuttle,yshuttle)
% create_JRPfig Creates the main figure for the CRP Toolbox
% Used by CRP Toolbox
% Copyright (c) 2004-2005 by AMRON
% Norbert Marwan, Potsdam University, Germany
% http://www.agnld.uni-potsdam.de
%
% $Date$
% $Revision$
%
% $Log$
% Revision 4.1 2005/03/16 12:21:30 marwan
% add support for joint recurrence plots
%
%
%
% This program is free software; you can redistribute it and/or
% modify it under the terms of the GNU General Public License
% as published by the Free Software Foundation; either version 2
% of the License, or any later version.
global props
scr=get(0,'ScreenSize');
x=xshuttle(:,2:end);
xscale=xshuttle(:,1);
y=yshuttle(:,2:end);
yscale=yshuttle(:,1);
h_fig=figure('Tag','CRPFig',... % Plot Figure
'Position',[scr(3)/4 scr(4)/8 3*scr(3)/8 3*scr(4)/4 ],...
'Color',props.window.Color,...
'NumberTitle','off',...
'Name',['Joint Recurrence Plot (' h ')'],...
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
'PaperPosition',[0.25 0.25 7.7677 11.193],...
'PaperType','a4',...
'PaperOrientation','portrait');
set(h_fig,props.window,'Units','Norm')
h1=axes(props.axes,'Units','norm','Position',[.1 .78 .8 .15]); % Data1 Plot
if size(y,2)>1
plot(y,'--','Tag','Data1')
else
plot(yscale,y,'r')
end
set(h1,'Tag','DataPlot1',...
'Xcolor','r','ycolor','r',...
'XaxisLocation','top',...
'YaxisLocation','right',...
'UserData',yshuttle)
h2=axes(props.axes,'Units','norm',... % Data2 Plot
'Position',[.1 .78 .8 .15],...
'Xcolor','k','ycolor','k',...
'XaxisLocation','bottom','yaxislocation','left');
if size(y,2)>1
plot(x,'-','Tag','Data2')
else
plot(xscale,x,'k')
end
set(h2,'color','none','Tag','DataPlot2','UserData',xshuttle)
grid on
if max(abs(x)) > max(abs(y))
scaling=abs(get(h2,'ylim'));
if scaling(1)>scaling(2)
set(h2,'ylim',[-scaling(1) scaling(1)])
else
set(h2,'ylim',[-scaling(2) scaling(2)])
end
scaling=get(h2,'ylim');
set(h1,'ylim',scaling)
else
scaling=abs(get(h1,'ylim'));
if scaling(1)>scaling(2)
set(h1,'ylim',[-scaling(1) scaling(1)])
else
set(h1,'ylim',[-scaling(2) scaling(2)])
end
scaling=get(h1,'ylim');
set(h2,'ylim',scaling)
end
h1=title('Underlying Time Series','units','normalized');
h2=get(h1,'Position');
set(h1,'Position',[h2(1) h2(2)+.12 h2(3)])
h_axes=axes(props.axes,'Units','norm',... % CRP Plot
'Color',[1 1 1], ...
'Tag','CRPPlot',...
'Position',[.1 .12 .8 .8*17/23]);
h1=image( 'Tag','CRPData','cdata',[]);
h1=title('','units','normalized');
set(h1,props.titletext)
h2=get(h1,'Position');
set(h1,'Position',[h2(1) h2(2)-.03 h2(3)])
h1=text( .5,.5,'busy...',... % Text Busy
props.normaltext,...
'Tag','Status',...
'Visible','off',...
'HorizontalAlignment','center',...
'VerticalAlignment','middle',...
'FontSize',18);
colormap(french(256))
h1=colorbar('horiz'); % Colorbar
set(h1,'Visible','off','Position',[.1 .07 .8 .02],'Tag','ColBar','xlim',[0 255])
set(get(h1,'children'),'Visible','off')
set(findobj('Tag','CRPPlot'),'Position',[.1 .12 .8 .8*17/23])
cm={'hsv';'hot';'gray';'french';'bone';'copper';... % Colormap
'pink';'flag';'lines';'colorcube';...
'jet';'prism';'cool';'autumn';...
'spring';'winter';'summer'};
h0=uimenu('Label','Colormap','Tag','cm');
for i=1:length(cm);
h1=uimenu(h0,'Label',cm{i},'Checked','Off',...
'Tag',num2str(i),...
if i==4, set(h1,'Checked','On'), end
end
h1=uimenu(h0,'Label','b/w','Tag','18','Callback','jrp colormap');
h1=uimenu(h0,'Label','inverse','Tag','19','Separator','On','Callback','jrp colormap');
h1=uimenu('Label','SmartClose',... % SmartClose
clear h1 h2 xshuttle yshuttle
set(h_fig, 'HandleVis','CallBack')