[14312] | 1 | Index: ../trunk-jpl/src/m/plot/plotmodel.m
|
---|
| 2 | ===================================================================
|
---|
| 3 | --- ../trunk-jpl/src/m/plot/plotmodel.m (revision 14299)
|
---|
| 4 | +++ ../trunk-jpl/src/m/plot/plotmodel.m (revision 14300)
|
---|
| 5 | @@ -33,16 +33,57 @@
|
---|
| 6 | if numberofplots,
|
---|
| 7 |
|
---|
| 8 | %Create figure
|
---|
| 9 | + f=figure(figurenumber);clf;
|
---|
| 10 | if strcmpi(getfieldvalue(options.list{1},'visible','on'),'off'),
|
---|
| 11 | - F=figure(figurenumber);clf;
|
---|
| 12 | - set(F,'Visible','Off');
|
---|
| 13 | - else
|
---|
| 14 | - figure(figurenumber);clf;
|
---|
| 15 | + set(f,'Visible','Off');
|
---|
| 16 | end
|
---|
| 17 |
|
---|
| 18 | - %Use zbuffer renderer (snoother colors)
|
---|
| 19 | - set(gcf,'Renderer','zbuffer');
|
---|
| 20 | + if exist(options.list{1},'figposition'), % {{{
|
---|
| 21 | + figposition=getfieldvalue(options.list{1},'figposition');
|
---|
| 22 | + if ischar(figposition),
|
---|
| 23 | + if strcmpi(figposition,'larour'),
|
---|
| 24 | + set(gcf,'Position',[1604 4 1594 1177]);
|
---|
| 25 | + elseif strcmpi(figposition,'larour2'),
|
---|
| 26 | + set(gcf,'Position',[756 62 827 504]);
|
---|
| 27 | + elseif strcmpi(figposition,'mathieu'),
|
---|
| 28 | + set(gcf,'Position',[300 1 1580 1150]);
|
---|
| 29 | + elseif strcmpi(figposition,'fullscreen'),
|
---|
| 30 | + set(gcf,'Position',get(0,'ScreenSize'));
|
---|
| 31 | + elseif strcmpi(figposition,'halfright'),
|
---|
| 32 | + screen=get(0,'ScreenSize');
|
---|
| 33 | + left=screen(1); bott=screen(2); widt=screen(3); heig=screen(4)-25;
|
---|
| 34 | + set(gcf,'Position',fix([left+widt/2 bott widt/2 heig]));
|
---|
| 35 | + elseif strcmpi(figposition,'halfleft'),
|
---|
| 36 | + screen=get(0,'ScreenSize');
|
---|
| 37 | + left=screen(1); bott=screen(2); widt=screen(3); heig=screen(4)-25;
|
---|
| 38 | + set(gcf,'Position',fix([left bott widt/2 heig]));
|
---|
| 39 | + elseif strcmpi(figposition,'square'),
|
---|
| 40 | + screen=get(0,'ScreenSize');
|
---|
| 41 | + left=screen(1); bott=screen(2); widt=min(screen(3)-25,screen(4)-25);
|
---|
| 42 | + set(gcf,'Position',fix([left+(screen(3)-widt) bott widt widt]));
|
---|
| 43 | + elseif strcmpi(figposition,'portrait'),
|
---|
| 44 | + %reformat with letter paper size (8.5" x 11")
|
---|
| 45 | + screen=get(0,'ScreenSize');
|
---|
| 46 | + left=screen(1); bott=screen(2); widt=screen(3); heig=screen(4)-25;
|
---|
| 47 | + portrait=fix([left+widt-(heig*8.5/11) bott heig*8.5/11 heig]);
|
---|
| 48 | + set(gcf,'Position',portrait)
|
---|
| 49 | + elseif strcmpi(figposition,'landscape'),
|
---|
| 50 | + %reformat with letter paper size (8.5" x 11")
|
---|
| 51 | + screen=get(0,'ScreenSize');
|
---|
| 52 | + left=screen(1); bott=screen(2); widt=screen(3); heig=screen(4)-25;
|
---|
| 53 | + landscape=fix([left+widt-(heig*11/8.5) bott heig*11/8.5 heig]);
|
---|
| 54 | + set(gcf,'Position',landscape)
|
---|
| 55 | + else
|
---|
| 56 | + disp('''figposition'' string not supported yet');
|
---|
| 57 | + end
|
---|
| 58 | + else
|
---|
| 59 | + set(gcf,'Position',figposition);
|
---|
| 60 | + end
|
---|
| 61 | + end % }}}
|
---|
| 62 |
|
---|
| 63 | + %Use zbuffer renderer (snoother colors) and white background
|
---|
| 64 | + set(f,'Renderer','zbuffer','color',getfieldvalue(options.list{1},'figurebackgroundcolor','w'));
|
---|
| 65 | +
|
---|
| 66 | %Go through all data plottable and close window if an error occurs
|
---|
| 67 | try,
|
---|
| 68 | for i=1:numberofplots,
|
---|
| 69 | Index: ../trunk-jpl/src/m/plot/applyoptions.m
|
---|
| 70 | ===================================================================
|
---|
| 71 | --- ../trunk-jpl/src/m/plot/applyoptions.m (revision 14299)
|
---|
| 72 | +++ ../trunk-jpl/src/m/plot/applyoptions.m (revision 14300)
|
---|
| 73 | @@ -330,52 +330,6 @@
|
---|
| 74 | set(gca,'pos',Axis);
|
---|
| 75 | end
|
---|
| 76 |
|
---|
| 77 | -%position of figure
|
---|
| 78 | -if exist(options,'figposition'),
|
---|
| 79 | -
|
---|
| 80 | - figposition=getfieldvalue(options,'figposition');
|
---|
| 81 | - if ischar(figposition),
|
---|
| 82 | - if strcmpi(figposition,'larour'),
|
---|
| 83 | - set(gcf,'Position',[1604 4 1594 1177]);
|
---|
| 84 | - elseif strcmpi(figposition,'larour2'),
|
---|
| 85 | - set(gcf,'Position',[756 62 827 504]);
|
---|
| 86 | - elseif strcmpi(figposition,'mathieu'),
|
---|
| 87 | - set(gcf,'Position',[300 1 1580 1150]);
|
---|
| 88 | - elseif strcmpi(figposition,'fullscreen'),
|
---|
| 89 | - set(gcf,'Position',get(0,'ScreenSize'));
|
---|
| 90 | - elseif strcmpi(figposition,'halfright'),
|
---|
| 91 | - screen=get(0,'ScreenSize');
|
---|
| 92 | - left=screen(1); bott=screen(2); widt=screen(3); heig=screen(4)-25;
|
---|
| 93 | - set(gcf,'Position',fix([left+widt/2 bott widt/2 heig]));
|
---|
| 94 | - elseif strcmpi(figposition,'halfleft'),
|
---|
| 95 | - screen=get(0,'ScreenSize');
|
---|
| 96 | - left=screen(1); bott=screen(2); widt=screen(3); heig=screen(4)-25;
|
---|
| 97 | - set(gcf,'Position',fix([left bott widt/2 heig]));
|
---|
| 98 | - elseif strcmpi(figposition,'square'),
|
---|
| 99 | - screen=get(0,'ScreenSize');
|
---|
| 100 | - left=screen(1); bott=screen(2); widt=min(screen(3)-25,screen(4)-25);
|
---|
| 101 | - set(gcf,'Position',fix([left+(screen(3)-widt) bott widt widt]));
|
---|
| 102 | - elseif strcmpi(figposition,'portrait'),
|
---|
| 103 | - %reformat with letter paper size (8.5" x 11")
|
---|
| 104 | - screen=get(0,'ScreenSize');
|
---|
| 105 | - left=screen(1); bott=screen(2); widt=screen(3); heig=screen(4)-25;
|
---|
| 106 | - portrait=fix([left+widt-(heig*8.5/11) bott heig*8.5/11 heig]);
|
---|
| 107 | - set(gcf,'Position',portrait)
|
---|
| 108 | - elseif strcmpi(figposition,'landscape'),
|
---|
| 109 | - %reformat with letter paper size (8.5" x 11")
|
---|
| 110 | - screen=get(0,'ScreenSize');
|
---|
| 111 | - left=screen(1); bott=screen(2); widt=screen(3); heig=screen(4)-25;
|
---|
| 112 | - landscape=fix([left+widt-(heig*11/8.5) bott heig*11/8.5 heig]);
|
---|
| 113 | - set(gcf,'Position',landscape)
|
---|
| 114 | - else
|
---|
| 115 | - disp('''figposition'' string not supported yet');
|
---|
| 116 | - end
|
---|
| 117 | - else
|
---|
| 118 | - set(gcf,'Position',figposition);
|
---|
| 119 | - end
|
---|
| 120 | -
|
---|
| 121 | -end
|
---|
| 122 | -
|
---|
| 123 | %axes position
|
---|
| 124 | if exist(options,'axesPosition')
|
---|
| 125 | set(gca,'Position',getfieldvalue(options,'axesPosition'));
|
---|
| 126 | @@ -445,9 +399,6 @@
|
---|
| 127 | %backgroundcolor
|
---|
| 128 | set(gca,'color',getfieldvalue(options,'backgroundcolor','none'));
|
---|
| 129 |
|
---|
| 130 | -%figurebackgrounbcolor
|
---|
| 131 | -set(gcf,'color',getfieldvalue(options,'figurebackgroundcolor','w'));
|
---|
| 132 | -
|
---|
| 133 | %lighting
|
---|
| 134 | if strcmpi(getfieldvalue(options,'light','off'),'on'),
|
---|
| 135 | set(gca,'FaceLighting','gouraud','FaceColor','interp','AmbientStrength',0.5);
|
---|