/usr/share/octave/site/m/octave-epstk/edemo3.m is in octave-epstk 2.4-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | %%
%% Routine: Multi plot
%% (see demo3.png)
%%
eopen('demo3.eps');
eglobpar; % get access to global parameters
eWinGridVisible=1;
esavpar; % save default parameter
%title
etext('Multi Plot',50,eWinHeight-15,8,0,1)
% set tics like Matlab
eAxesValueSpace=3;
eAxesTicLongLength=-1;
eAxesTicShortLength=-0.5;
% simple plot
eAxesColor=[0 0.4 0];
ePlotAreaPos=[20 150];
ePlotAreaHeight=50;
ePlotAreaWidth=50;
eYAxisWestLabelText='f(x)';
eXAxisSouthLabelText='x [rad]';
etitle(sprintf('Simple Plot (like Matlab\\256)'),10,6,[0 0 0.5]);
eYAxisWestScaleType=2;
eYGridVisible=1;
xData=0:0.1:2*pi;
eYAxisEastValueFormat=2;
eplot(xData,exp(sin(xData).*xData),'exp(sin(x)*x)',0,[1 0 0]);
eplot(xData,exp(cos(xData).*xData),'exp(cos(x)*x)',2,[0 0 1]);
eplot;
% polar plot
erespar; % set default parameter
eAxesColor=[1 0 1];
ePolarPlotAreaCenterPos=[135 200];
ePolarPlotAreaRadMin=10;
ePolarPlotAreaRadMax=25;
ePolarPlotAreaAngStart=110;
ePolarPlotAreaAngEnd=340;
ePolarAxisRadVisible=3;
ePolarAxisRadValueVisible=3;
ePolarAxisRadScale=[0 0.5 1];
ePolarAxisAngScale=[0 30 0];
ePolarAxisAngValueFormat='%d deg';
ePlotTitleDistance=15;
ePlotTitleText='Polar Plot';
ePolarAngleGridDash=[0.5 0.8 1.5];
ePolarRadiusGridDash=[0.5 0.3 1.5];
xData=0:0.01:2*pi;
edsymbol('star','star.psd',0.1,0.1,0,0,[0 0 0]);
epolar(xData,cos(xData*3)*0.4,'symbols','star');
epolar(xData,cos(xData*7)*0.2,'cosine filled',-1,[1 1 0]);
epolar(xData,sin(xData*4),'sine',0,[1 0 0]);
epolar(xData,cos(xData*5),'cosine',[1 0.5 1.5],[0 0 1],1);
epolar;
angles=ePolarAxisAngValueAngle*pi/180;
dis=11;
lPos=[cos(angles) sin(angles)]*(ePolarPlotAreaRadMax+dis);
lPos=[lPos(:,1)+ePolarPlotAreaCenterPos(1)...
lPos(:,2)+ePolarPlotAreaCenterPos(2)];
i=1;
etext('Start',lPos(i,1),lPos(i,2),4,4,1,0,[0 0.8 0]);
i=2;
etext('second',lPos(i,1),lPos(i,2),4,4,1,ePolarAxisAngValueAngle(i),[0 1 0]);
i=9;
%etext('9.value',lPos(i,1),lPos(i,2),4,2,1,0,[1 0.2 0]);
i=size(lPos,1);
ellipseW=2*(dis-eAxesTicLongLength);
eellipse(lPos(i,1),lPos(i,2),ellipseW,ellipseW,0,-1,[1 1 1]); % cover value
etext('End',lPos(i,1),lPos(i,2),4,3,1,0,[0.8 0 0]);
% cross axes plot
erespar; % set default parameter
eAxesColor=[0 0.4 0];
ePlotAreaPos=[110 80];
ePlotAreaHeight=50;
ePlotAreaWidth=50;
ePlotTitleDistance=5;
ePlotTitleText='Cross Axes';
eAxesCrossOrigin=2; % cross axes with arrows
xData=-3.2:0.1:6.2;
eplot(xData,sin(xData),'',0,[1 0 0]);
eplot(xData,cos(xData),'',0,[0 0 1]);
eplot
% interpolation image
erespar; % set default parameter
ePlotAreaPos=[20 55];
ePlotAreaHeight=50;
ePlotAreaWidth=50;
eYAxisWestLabelText='Y-Values';
eYAxisWestTicsVisible=0; % no tics visible
eXAxisSouthLabelText='X-Values';
eImageLegendPos=[0 -5];
ePlotTitleDistance=5;
ePlotTitleText='Linear interpolation';
eXAxisNorthVisible=0;
eYAxisEastVisible=0;
matrix=efillmat([1 -1 -1 1],[1 1 -1 -1],[100 1 100 1],0.02,0.02);
matrix=einflate(matrix,0.8);
eImageLegendScaleType=2;
eXAxisSouthScale=[-1 0 1]; %set scale x-axis
eYAxisWestScale=[-1 0 1]; %set scale y-axis
eimagesc(matrix,ecolors(3),'e'); % print scaled image
% mixing photos
erespar; % set default parameter
ePlotAreaPos=[125 1];
ePlotAreaHeight=50;
ePlotAreaWidth=50;
ePlotTitleDistance=5;
ePlotTitleText='Mixed photo';
eImageLegendVisible=0;
img1=eimgread([ePath 'default.jpg']);
img2=eimgread;
img2=eimgzoom(img2,-1,1.9); % resize image
[img1Height img1Width]=size(img1);
[img2Height img2Width]=size(img2);
imgMask=eimgmask(img2Height,img2Width,1,0.6);
img2Pos=[fix((img1Height-img2Height)/2) fix((img1Width-img2Width)/2)];
photo=eimgmix(img1,img2,imgMask,img2Pos); % mixing
eimage(photo,-1);
% shadow photo
erespar; % set default parameter
ePlotAreaPos=[90 1];
ePlotAreaHeight=25;
ePlotAreaWidth=25;
ePlotTitleDistance=5;
ePlotTitleText='Shadow photo';
[photo colormap]=eppmread; % read default image
eshadoi(photo); % print shadow image
% merged and unmerged images
ePlotTitleText='Merged image';
photo=emerge(photo,[47 11]); % merge pixel
ePlotAreaPos=[10 1];
eimage(photo,colormap);
ePlotTitleText='Unmerged image';
photo=emerge(photo,[47 11],-1); % merge pixel backwards
ePlotAreaPos=[50 1];
eimage(photo,colormap);
% close eps-file
eclose;
if ~exist('noDemoShow')
eview % start ghostview with eps-file
end
|