summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic1r.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic1r.cs')
-rw-r--r--Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic1r.cs531
1 files changed, 327 insertions, 204 deletions
diff --git a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic1r.cs b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic1r.cs
index f45ffee8d7a..024f9df129b 100644
--- a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic1r.cs
+++ b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic1r.cs
@@ -14,9 +14,9 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>
//
-println("KETCindy V.3.2.0(20180409)");
-println(ketjavaversion());//17.06.05
-println("ketcindylibbasic1(20180408) loaded");
+println("KeTCindy V.3.2.1(20180614)");
+println(ketjavaversion());
+println("ketcindylibbasic1(20180613) loaded");
//help:start();
@@ -48,7 +48,7 @@ Ketinit(sy,rangex,rangey):=(
MEMORIInit=MEMORI;
MEMORINow=MEMORI;
MARKLEN=0.05;
- MARKLENInit=MARKLEN:
+ MARKLENInit=MARKLEN; //180504
MARKLENNow= MARKLEN;
GENTEN=[0,0];//18.01.15until
KETPICLAYER=20;
@@ -72,10 +72,12 @@ Ketinit(sy,rangex,rangey):=(
COM0thlist=[];
COM1stlist=[];
COM2ndlist=[];
+ COM2ndlistb=[]; //180612
ADDAXES="1";
LFmark=unicode("000a");
CRmark=unicode("000d");//16.12.13
Dq=unicode("0022");
+ CommonMake=0;//180610
WaitUnit=10;
CONTINUED=0;
OutComList=[];
@@ -90,6 +92,7 @@ Ketinit(sy,rangex,rangey):=(
Slidename=Fhead; //17.10.24
);//17.11.12
Dircdy=replace(Dircdy,"%E3%80%80"," ");//180405
+ Namecdy=Cindyname();//180608
tmp1=Indexall(Dircdy,"%"); //180329from
if(length(tmp1)>0,
tmp1=append(tmp1,length(Dircdy));
@@ -106,9 +109,9 @@ Ketinit(sy,rangex,rangey):=(
if(substring(Dircdy,0,1)==pathsep(),
Dircdy=substring(Dircdy,1,length(Dircdy));
);
- Changesetting([gethome(), gethome()+"\Desktop","C:"]); //180405
+// Changesetting([gethome(), gethome()+"\Desktop","C:"]); //180405
,
- Changesetting([gethome(),gethome()+"/Desktop"]);
+// Changesetting([gethome(),gethome()+"/Desktop"]);
);
Changework(Dircdy+pathsep()+"fig"); //180329to
Fnametex=Fhead+".tex";
@@ -186,7 +189,7 @@ Changesetting(dirL):=( //180329
Cindyname():=Getcdyname();
Cdyname():=Getcdyname();
Getcdyname():=( //17.12.27
-//help:Cdyname();
+//help:Cindyname();
regional(out);
out=text(curkernel());
out=replace(out,".cdy","");
@@ -436,6 +439,18 @@ Indexall(str,key):=(
out;
);
+Strsplit(str,key):=( //180505
+ regional(start,out,tmp1,tmp2);
+ tmp1=Indexall(str,key);
+ out=[]; start=0;
+ forall(tmp1,
+ out=append(out,substring(str,start,#-1));
+ start=#;
+ );
+ out=append(out,substring(str,start,length(str)));
+ out;
+);
+
Parlevel(str):=Bracket(str); // 16.05.22from
Bracket(str):=Bracket(str,"()");
Bracket(str,br):=(
@@ -559,9 +574,24 @@ Pardiagram(str,options):=(
out;
);
-Changework(dirorg):=( //16.10.21
+Changework(dirorg):=Changework(dirorg,["Sub=y"]);
+Changework(dirorg,options):=( //16.10.21
//help:Changework(directory);
- regional(dir,subdir,tmp);
+//help:Changework(Dircdy+"fig");
+//help:Changework(options=["Sub=y"]);
+ regional(dir,subdir,tmp,,eqL,makesub);
+ tmp=Divoptions(options);
+ eqL=tmp_5; //180605from
+ makesub=1;
+ forall(eqL,
+ tmp=Strsplit(#,"=");
+ if(Toupper(tmp_1)=="SUB",
+ tmp=Toupper(tmp_2);
+ if(substring(tmp,0,1)=="N",
+ makesub=0;
+ );
+ );
+ ); //180605to
dir=replace(dirorg,"/",pathsep());//17.11.20from
dir=replace(dir,"\",pathsep());
dir=replace(dir,pathsep()+pathsep(),pathsep());//17.11.24
@@ -577,11 +607,14 @@ Changework(dirorg):=( //16.10.21
dir=substring(dir,0,tmp-1);
); //17.11.24until
if(dir=="" % !isexists(dir,""),
- println("Directory "+dir+" not exist, so set to "+Dirwork);
+ println("Directory "+dir+" not exist, so set to "+Dircdy);//180604(2lines)
+ Dirwork=Dircdy;
ErrFlag=-1;
,
- if(length(subdir)>0, //17.11.24from
- println(makedir(dir,subdir));
+ if(length(subdir)>0, //180605
+ if(makesub==1,//180606from
+ println(makedir(dir,subdir));
+ );//180606
Dirwork=dir+pathsep()+subdir;
,
Dirwork=dir;
@@ -593,37 +626,36 @@ Changework(dirorg):=( //16.10.21
closefile(SCEOUTPUT);
println(setexec(Dirwork,"/kc.sh"));
);
- ,
- if(isincludefull(Dirwork),//180408from
- SCEOUTPUT = openfile("utf8.txt");
- println(SCEOUTPUT,"tmp="+Dqq(Dirwork)+";");
- closefile(SCEOUTPUT);
- nkfwin("C:",Dirwork,"utf8.txt","sjis.txt");//180408to
- );
);
);
);
Changestyle(nameL,style):=(
//help:Changestyle(["sgAB"],["da"]);
- regional(nmL,name,Ltype,Ltypeorg,Noflg,opcindy,tmp);
+ regional(nmL,name,Ltype,Ltypeorg,Noflg,color,opcindy,tmp);
tmp=Divoptions(style);
Ltypeorg=tmp_1;
Noflg=tmp_2;
+ color=tmp_(length(tmp)-2);
opcindy=tmp_(length(tmp));
if(islist(nameL),nmL=nameL,nmL=[nameL]);
forall(nmL,name,
- Ltype=Ltypeorg;
- GCLIST=select(GCLIST,#_1!=name);
- COM2ndlist=select(COM2ndlist,
- (indexof(#,"("+name)==0)%(indexof(#,"Shade")>0)); // 15.05.23,16.12.13
- if(Noflg<2,
- if(isstring(Ltype),
- Ltype=GetLinestyle(text(Noflg)+Ltype,name);
- ,
- if(Noflg==1,Ltype=0);
+ tmp=select(GCLIST,#_1==name);
+ if(length(tmp)>0,
+ Ltype=Ltypeorg;
+ GCLIST=select(GCLIST,#_1!=name);
+ COM2ndlist=select(COM2ndlist,
+ (indexof(#,"("+name)==0)%(indexof(#,"Shade")>0)); // 15.05.23,16.12.13
+ if(Noflg<2,
+ if(isstring(Ltype),
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+color+")"));
+ Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+text(KCOLOR)+")"));
+ ,
+ if(Noflg==1,Ltype=0);
+ );
+ GCLIST=append(GCLIST,[name,Ltype,opcindy]);
);
- GCLIST=append(GCLIST,[name,Ltype,opcindy]);
);
);
);
@@ -908,24 +940,26 @@ MeasureDepth(list):=(
regional(tmp,tmp1,Depth,Flg);
Flg=0;
Depth=0;
- if(ispoint(list), // 15.01.22
- Depth=0;
- Flg=1;
- ,
- tmp1=select(1..(length(list)),length(list_#)>0);//17.05.21from
- tmp=list_(tmp1_1);//17.05.21until
- );
- repeat(4,
- if(Flg==0,
- if(islist(tmp),
- tmp=tmp_1;
- Depth=Depth+1;
- ,
- if(ispoint(tmp),Depth=Depth+1);
- Flg=1;
+ if(length(list)>0, //180501
+ if(ispoint(list),
+ Depth=0;
+ Flg=1;
+ ,
+ tmp1=select(1..(length(list)),length(list_#)>0);//17.05.21from
+ tmp=list_(tmp1_1);//17.05.21until
+ );
+ repeat(4,
+ if(Flg==0,
+ if(islist(tmp),
+ tmp=tmp_1;
+ Depth=Depth+1;
+ ,
+ if(ispoint(tmp),Depth=Depth+1);
+ Flg=1;
+ );
);
);
- );
+ );//180501
Depth;
);
@@ -953,7 +987,7 @@ Flattenlist(pltlist):=(
Divoptions(options):=(
//help:Divoptions(options);
- regional(Ltype,Noflg,Inflg,Outflg,eqL,realL,strL,opstr,opcindy,flg,tmp,tmp1);
+ regional(Ltype,Noflg,Inflg,Outflg,eqL,realL,strL,color,opstr,opcindy,flg,tmp,tmp1,tmp2);
Ltype="dr"; // 2015.01.13
Noflg=0;
Inflg=0;
@@ -961,6 +995,7 @@ Divoptions(options):=(
eqL=[];
realL=[];
strL=[];
+ color=KCOLOR; //180603
opstr="";
opcindy="";
forall(options,
@@ -974,7 +1009,31 @@ Divoptions(options):=(
);
if(flg==0,
if(indexof(#,"=")>0,
- eqL=append(eqL,#);
+ tmp=Strsplit(#,"="); //180602from
+ tmp1=Toupper(tmp_1);
+ tmp2=tmp_2;
+ if(tmp1=="COLOR",
+ if(substring(tmp2,0,1)=="[",
+ tmp1=parse(tmp2);
+ color=tmp1;
+ if(length(tmp1)==4,
+ tmp1=colorCmyk2Rgb(tmp1);
+ );
+ ,
+ if(tmp2=="red",tmp1=[1,0,0];color=tmp1);
+ if(tmp2=="green",tmp1=[0,1,0];color=tmp1);
+ if(tmp2=="blue",tmp1=[0,0,1];color=tmp1);
+ if(tmp2=="black",tmp1=[0,0,0];color=tmp1);
+ if(tmp2=="white",tmp1=[1,1,1];color=tmp1);
+ if(tmp2=="cyan",tmp1=[0,1,1];color=tmp1);
+ if(tmp2=="magenta",tmp1=[1,0,1];color=tmp1);
+ if(tmp2=="yellow",tmp1=[1,1,0];color=tmp1);
+ );
+ tmp="color->"+text(tmp1);
+ opcindy=opcindy+","+tmp;
+ ,
+ eqL=append(eqL,#);
+ );//180602to
flg=1;
);
);
@@ -1032,9 +1091,9 @@ Divoptions(options):=(
);
);
if(indexof(opcindy,"color->")==0,// 16.10.07from
- opcindy=opcindy+",color->[0,0,0]";
+ opcindy=opcindy+",color->"+text(KCOLOR);
);
- [Ltype,Noflg,Inflg,Outflg,eqL,realL,strL,opstr,opcindy];
+ [Ltype,Noflg,Inflg,Outflg,eqL,realL,strL,color,opstr,opcindy];
);
Dotprod(vec1,vec2):=(
@@ -2229,11 +2288,17 @@ Com1st(String):=(
// COM1stlist=append(COM1stlist,str);
);
-Com2nd(String):=(
-// help:Com2nd("");
- regional(str);
- str=replace(String,LFmark,"");
+Com2nd(String):=Com2nd(String,["a"]);//180612
+Com2nd(String,option):=(
+// help:Com2nd(str,["before"]);
+ regional(str,tmp);
+ str=replace(String,LFmark,"");
+ tmp=substring(option_1,0,1);//180612from
+ if(Toupper(tmp)=="B",
+ COM2ndlistb=append(COM2ndlistb,str);
+ ,
COM2ndlist=append(COM2ndlist,str);
+ );//180612to
);
Com2ndpre(String):=(
@@ -2306,6 +2371,7 @@ Setunitlen():=(
println(ULEN);
);
Setunitlen(UI):=(
+//help:Setunitlen("1.5cm");
regional(Dx,Dy,Sym,SL,OL,Is,VL,Ucode,ii,cha,
str,Unit,Valu,flg,tmp);
Dx=XMAX-XMIN;
@@ -2315,7 +2381,7 @@ Setunitlen(UI):=(
OL="+-*/";
if(length(UI)>0,
ULEN=UI;
- GLIST=append(GLIST,"Setunitlen("+Dq+string+Dq+")");
+ GLIST=append(GLIST,"Setunitlen("+Dq+UI+Dq+")");//180513
);
Is=1;
VL="";
@@ -2484,46 +2550,33 @@ Definecolor(name,data):=(
Texcom(tmp);
);
-Setcolor(Par):=(
+Setcolor(parorg):=( //180603renew
//help:Setcolor([1,0,0,1]);
//help:Setcolor([1,1,0]);
- if(islist(Par),
- if(length(Par)==3,
- Setcolorrgb(Par); // 2015.04.28
-// KCOLOR=Par;
- );
- if(length(Par)==4,
- Setcolor(Par,[]);
- );
- ,
- Setcolor(Par,[]);
- );
-);
-
-Setcolor(colorname,options):=(
-//help:Setcolor("greenyellow",0.3);
- regional(tmp);
- if(isstring(colorname),
- tmp="Setcolor("+Dq+colorname+Dq;
- if(length(options)>0,
- tmp=tmp+","+text(options_1);
- );
- Com2nd(tmp+")");
- );
- if(islist(colorname),
- tmp=text(colorname);
- tmp=substring(tmp,1,length(tmp)-1);
- Texcom("\color[cmyk]{"+tmp+"}"); //17.09.22
- );
-);
-
-Setcolorrgb(colorlist):=(
-// help:Setcolorrgb([0.5,0.3,0.4]);
- regional(tmp);
- tmp=text(colorlist);
- tmp=substring(tmp,1,length(tmp)-1);
- tmp="Texcom("+Dq+"\\color[rgb]{"+tmp+"}"+Dq+")"; //17.10.07
- Com2nd(tmp);
+ regional(par,cstr,tmp,tmp1);
+ par=parorg;
+ if(isstring(par),
+ if(par=="black",par=[0,0,0]);
+ if(par=="white",par=[1,1,1]);
+ if(par=="red",par=[1,0,0]);
+ if(par=="green",par=[0,1,0]);
+ if(par=="blue",par=[0,0,1]);
+ if(par=="cyan",par=[0,1,1]);
+ if(par=="magenta",par=[1,0,1]);
+ if(par=="yellow",par=[1,1,0]);
+ );
+ cstr=text(par);
+ cstr=substring(cstr,1,length(cstr)-1);
+ if(length(par)==3,
+ cstr="Texcom('\\color[rgb]{"+cstr+"}')";
+ KCOLOR=par;
+ );
+ if(length(par)==4,
+ cstr="Texcom('\\color[cmyk]{"+cstr+"}')";
+ tmp=ColorCmyk2Rgb(par);
+ KCOLOR=tmp;
+ );
+ Com2nd(cstr);
);
ColorRgb2Cmyk(clr):=(
@@ -2815,30 +2868,6 @@ Colorcode(src,dest,sL):=(
dL;
);
-Addcolor(cmdorg,list):=(
-//help:Addcolor("Plotdata('1','x^2','x',[])",[1,1,0]);
- regional(rgb,cmyk,cmd,tmp,tmp1,tmp2,tmp3,tmp4);
- cmd=replace(cmdorg,"'",Dq);
- if(length(list)==3,
- rgb=list;
- cmyk=Colorcode("rgb","cmyk",list);
- ,
- cmyk=list;
- rgb=Colorcode("cmyk","rgb",list);
- );
- tmp1="color->"+text(rgb);
- tmp2="Setcolor("+text(cmyk)+");";
- tmp3=substring(cmd,0,length(cmd)-2);
- tmp=substring(tmp3,length(tmp3)-1,length(tmp3));
- if(tmp!="[",
- tmp3=tmp3+",";
- );
- tmp3=tmp3+Dq+tmp1+Dq+"])";
- parse(tmp2);
- parse(tmp3);
- Setcolor("black");
-);
-
Colorinfile(filename,clrf,clrt):=(
regional(tmp,tmp1,tmp2,head,cstrL,chstrL,head,body);
if(length(clrf_1)==3,
@@ -2974,23 +3003,12 @@ Chunderscore(str):=(
tmp1;
);
-//AddGraph(pltdata):=AddGraph("-"+pltdata,pltdata,[]);
AddGraph(nm,pltdata):=AddGraph(nm,pltdata,[]);
-// if(isstring(Arg2),
-// AddGraph(Arg1,Arg2,[]);
-// ,
-// if(MeasureDepth(Arg2)>0,
-// Addgraph(Arg1,Arg2,[]);
-// ,
-// Addgraph("-"+Arg1,Arg1,Arg2);
-// );
-// );
-//);
AddGraph(nm,pltdata,options):=(
//help:AddGraph("1","imp1"); // 16.04.04
//help:Addgraph("1",["[pt1]","gr1"],["nodisp"]);
regional(name,Ltype,Noflg,opcindy,pdata,fname,flg,
- tmp,tmp1,tmp2,tmp3);
+ tmp,tmp1,tmp2,tmp3,color);
if(substring(nm,0,1)=="-",
name=substring(nm,1,length(nm));
,
@@ -2999,7 +3017,8 @@ AddGraph(nm,pltdata,options):=(
tmp=Divoptions(options);
Ltype=tmp_1;
Noflg=tmp_2;
- opcindy=tmp_9;
+ color=tmp_(length(tmp)-2);
+ opcindy=tmp_(length(tmp));
if(isstring(pltdata),
pdata=parse(pltdata)
,
@@ -3072,7 +3091,9 @@ AddGraph(nm,pltdata,options):=(
); // 16.04.04 until
if(Noflg<2,
if(isstring(Ltype),
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+color+")"));
Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+text(KCOLOR)+")"));
,
if(Noflg==1,Ltype=0);
);
@@ -3084,7 +3105,7 @@ Joincrvs(nm,plotstrL):=Joincrvs(nm,plotstrL,[]);
Joincrvs(nm,plotstrL,options):=(
//help:Joincrvs("1",["sgAB","sgDCB"]);
regional(plotlist,PtL,Eps,QdL,Flg,Ni,Qd,pP,pS,pQ,pR,rMN,
- opcindy,tmp,tmp1,tmp2,str,name,Ltype,Noflg);
+ opcindy,tmp,tmp1,tmp2,str,name,Ltype,Noflg,color);
name="join"+nm;
plotlist=[];
forall(plotstrL,str,
@@ -3100,6 +3121,7 @@ Joincrvs(nm,plotstrL,options):=(
tmp=Divoptions(options);
Ltype=tmp_1;
Noflg=tmp_2;
+ color=tmp_(length(tmp)-2);
opcindy=tmp_(length(tmp));
tmp1=tmp_6;
if(length(tmp1)>0,Eps=tmp1_1);
@@ -3162,7 +3184,9 @@ Joincrvs(nm,plotstrL,options):=(
);
if(Noflg<2,
if(isstring(Ltype),
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+color+")"));
Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+text(KCOLOR)+")"));
,
if(Noflg==1,Ltype=0);
);
@@ -3176,7 +3200,7 @@ Partcrv(nm,pA,pB,PkLstr,options):=(
//help:Partcrv("1",A,B,"sgABC");
//help:Partcrv("1",1.3,2.5,"sgABC");
regional(PkL,Ans,Eps,Npt,Out1,Out2,tmp,tmp1,Flg,nS,nE,PPL,pP,
- opcindy,Ta,Tb,name,Ltype,Noflg,DepthFlg);
+ opcindy,Ta,Tb,name,Ltype,Noflg,DepthFlg,color);
name="part"+nm;
if(isstring(PkLstr),PkL=parse(PkLstr),PkL=PkLstr);
DepthFlg=0;
@@ -3188,6 +3212,7 @@ Partcrv(nm,pA,pB,PkLstr,options):=(
tmp=Divoptions(options);
Ltype=tmp_1;
Noflg=tmp_2;
+ color=tmp_(length(tmp)-2);
opcindy=tmp_(length(tmp));
Eps=10^(-3);
Flg=0;
@@ -3246,7 +3271,9 @@ Partcrv(nm,pA,pB,PkLstr,options):=(
);
if(Noflg<2,
if(isstring(Ltype),
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+color+")"));
Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+text(KCOLOR)+")"));
,
if(Noflg==1,Ltype=0);
);
@@ -3271,17 +3298,18 @@ Pointdata(nm,listorg,options):=(
//help:Pointdata("1",[2,4],["Size=5"]);
//help:Pointdata("2",[[2,3],[4,1]]);
regional(list,name,nameL,ptlist,opstr,opcindy,
- eqL,size,thick,tmp,tmp1,tmp2,tmp3,Ltype,Noflg);
+ eqL,size,thick,tmp,tmp1,tmp2,tmp3,Ltype,Noflg,color);
name="pt"+nm;
nameL=name+"L";
println("generate pointdata "+name);
tmp=Divoptions(options);
Ltype=tmp_1;
Noflg=tmp_2;
+ eqL=tmp_5;
opcindy=tmp_(length(tmp));
opstr=tmp_(length(tmp)-1);
+ color=tmp_(length(tmp)-2);
size="";
- eqL=tmp_5;
if(length(eqL)>0,
forall(eqL,
tmp=substring(#,0,1);
@@ -3292,6 +3320,7 @@ Pointdata(nm,listorg,options):=(
);
);
if(isstring(listorg),list=parse(listorg),list=listorg); //17.10.23
+ if(MeasureDepth(list)==0,list=[list]);//180530
tmp=MeasureDepth(list);
if(tmp>0, // 2015.02.21
if(tmp==1,ptlist=list,ptlist=list_1);
@@ -3337,7 +3366,9 @@ Pointdata(nm,listorg,options):=(
if(length(size)>0,tmp1=parse(size),tmp1=1);
tmp1=max(tmp1,1)/8;
Setpen(tmp1); // 16.04.09 until
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+color+")"));
Com2nd("Drwpt(list("+name+")"+opstr+")");
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+text(KCOLOR)+")"));
Setpen(thick); // 16.04.09
if(length(size)>0,
Com2nd("Setpt("+textformat(TenSize/TenSizeInit,1)+")");
@@ -3352,7 +3383,7 @@ Listplot(nm,list,options):=(
// help:Listplot(["A","B"]);
//help:Listplot("1",[[2,1],[3,3]]);
//help:Listplot(options2=["Msg=yes"]);
- regional(name,tmp,tmp1,ptlist,Ltype,opcindy,Noflg,eqL,Msg);
+ regional(name,tmp,tmp1,ptlist,Ltype,opcindy,Noflg,eqL,Msg,color);
if(substring(nm,0,1)=="-", // 16.01.27 from
name=substring(nm,1,length(nm));
,
@@ -3362,6 +3393,7 @@ Listplot(nm,list,options):=(
Ltype=tmp_1;
Noflg=tmp_2;
eqL=tmp_5;
+ color=tmp_(length(tmp)-2);
opcindy=tmp_(length(tmp));
Msg=1; // 15.09.17
forall(eqL,
@@ -3386,7 +3418,9 @@ Listplot(nm,list,options):=(
);
if(Noflg<2,
if(isstring(Ltype),
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+color+")"));
Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+text(KCOLOR)+")"));
,
if(Noflg==1,Ltype=0);
);
@@ -3417,13 +3451,14 @@ Lineplot(nm,list,options):=(
//help:Lineplot([A,B]);
//help:Lineplot("1",[[2,1],[3,3]]);
regional(name,Out,tmp,tmp1,opstr,opcindy,Mag,Semi,
- Vec,pA,pB,Ltype,Noflg);
+ Vec,pA,pB,Ltype,Noflg,color);
name="ln"+nm;
Mag=100;
Semi="";
tmp=Divoptions(options);
Ltype=tmp_1;
Noflg=tmp_2;
+ color=tmp_(length(tmp)-2);
opcindy=tmp_(length(tmp));
opstr=tmp_(length(tmp)-1);
tmp1=tmp_6;
@@ -3450,7 +3485,9 @@ Lineplot(nm,list,options):=(
);
if(Noflg<2,
if(isstring(Ltype),
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+color+")"));
Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+text(KCOLOR)+")"));
,
if(Noflg==1,Ltype=0);
);
@@ -3483,7 +3520,7 @@ Plotdata(name1,func,variable,options):=(
//help:Plotdata("3","Fout(x)","x",["out"]);
regional(Fn,Va,tmp,tmp1,tmp2,eqL,name,Vname,x1,x2,dx,
PdL,QdL,Num,Ec,Dc,Fun,Exfun,x,Ke,Eps,Pa,
- Ltype,Noflg,Inflg,Outflg,opstr,opcindy);
+ Ltype,Noflg,Inflg,Outflg,opstr,opcindy,color);
name="gr"+name1;
tmp=Divoptions(options);
Ltype=tmp_1;
@@ -3491,6 +3528,7 @@ Plotdata(name1,func,variable,options):=(
Inflg=tmp_3;
Outflg=tmp_4;
opstr=tmp_(length(tmp)-1);
+ color=tmp_(length(tmp)-2);
opcindy=tmp_(length(tmp));
eqL=tmp_5;
Num=50;
@@ -3617,8 +3655,10 @@ Plotdata(name1,func,variable,options):=(
);
if(Noflg<2,
if(isstring(Ltype),
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+color+")"));
Ltype=GetLinestyle(text(Noflg)+Ltype,name);
- ,
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+text(KCOLOR)+")"));
+ ,
if(Noflg==1,Ltype=0);
);
GCLIST=append(GCLIST,[name,Ltype,opcindy]);
@@ -3627,7 +3667,9 @@ Plotdata(name1,func,variable,options):=(
,
if(Noflg<2,
if(isstring(Ltype),
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+color+")"));
Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+text(KCOLOR)+")"));
,
if(Noflg==1,Ltype=0);
);
@@ -3643,7 +3685,7 @@ Paramplot(name1,funstr,variable,options):=(
//help:Paramplot("1","[2*cos(t),sin(t)]","t=[0,2*pi]");
regional(name,Out,tmp,tmp1,tmp2,vname,func,str,Rng,Num,
Ec,Exfun,Dc,eqL,Fntmp,Vatmp,t1,t2,dt,tt,pa,ke,
- Ltype,Noflg,Inflg,Outflg,opstr,opcindy);
+ Ltype,Noflg,Inflg,Outflg,opstr,opcindy,color);
name="gp"+name1;
Eps=10^(-4);
tmp=Divoptions(options);
@@ -3651,6 +3693,7 @@ Paramplot(name1,funstr,variable,options):=(
Noflg=tmp_2;
Inflg=tmp_3;
Outflg=tmp_4;
+ color=tmp_(length(tmp)-2);
opstr=tmp_(length(tmp)-1);
opcindy=tmp_(length(tmp));
eqL=tmp_5;
@@ -3760,7 +3803,9 @@ Paramplot(name1,funstr,variable,options):=(
);
if(Noflg<2,
if(isstring(Ltype),
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+color+")"));
Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+text(KCOLOR)+")"));
,
if(Noflg==1,Ltype=0);
);
@@ -3770,7 +3815,9 @@ Paramplot(name1,funstr,variable,options):=(
,
if(Noflg<2,
if(isstring(Ltype),
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+color+")"));
Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+text(KCOLOR)+")"));
,
if(Noflg==1,Ltype=0);
);
@@ -3850,7 +3897,7 @@ Implicitplot(name1,func,xrng,yrng,options):=(
//help:Implicitplot("1","x^2+x*y+y^2=1","x=[-3,3]","y=[-3,3]");
//help:Implicitplot(options=["Num=[50,50]"]);
regional(name,Fn,varx,vary,rngx,rngy,Mdv,Ndv,tmp,tmp1,tmp2,
- Eps,Ltype,Noflg,eqL,opsr,opcindy,dx,dy,out,jj,ii,kk,
+ Eps,Ltype,Noflg,eqL,color,opsr,opcindy,dx,dy,out,jj,ii,kk,
yval1,yval2,xval1,xval2,eval11,eva12,eval21,eval22,pL,vL,qL);
name="imp"+name1;
Eps=10^(-4);
@@ -3858,6 +3905,7 @@ Implicitplot(name1,func,xrng,yrng,options):=(
Ltype=tmp_1;
Noflg=tmp_2;
eqL=tmp_5;
+ color=tmp_(length(tmp)-2);
opstr=tmp_(length(tmp)-1);
opcindy=tmp_(length(tmp));
Mdv=50;Ndv=50;
@@ -3961,7 +4009,9 @@ Implicitplot(name1,func,xrng,yrng,options):=(
);
if(Noflg<2,
if(isstring(Ltype),
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+color+")"));
Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+text(KCOLOR)+")"));
,
if(Noflg==1,Ltype=0);
);
@@ -3990,15 +4040,16 @@ Circledata(para1,para2):=(
Circledata(name,cenrad,options);
);
Circledata(nm,cenrad,options):=(
- regional(name,Out,Ctr,Ptcir,ra,Num,Rg,opstr,opcindy,
+ regional(name,Out,Ctr,Ptcir,ra,Num,Rg,opstr,opcindy,color,
tmp,tmp1,tmp1,Th,Ltype,Noflg,eqL,pA,pB,pC,d1,d2,Eps);
name="cr"+nm;
tmp=Divoptions(options);
Ltype=tmp_1;
Noflg=tmp_2;
+ eqL=tmp_5;
+ color=tmp_(length(tmp)-2);
opstr=tmp_(length(tmp)-1);
opcindy=tmp_(length(tmp));
- eqL=tmp_5;
Num=50;
Rg=[0,2*pi];
forall(eqL,
@@ -4065,7 +4116,9 @@ Circledata(nm,cenrad,options):=(
);
if(Noflg<2,
if(isstring(Ltype),
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+color+")"));
Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+text(KCOLOR)+")"));
,
if(Noflg==1,Ltype=0);
);
@@ -4107,11 +4160,12 @@ Framedata(nm,list,options):=(
//help:Framedata("1",[C,A]);
//help:Framedata("1",[C,dx,dy]);
regional(name,Out,tmp,tmp1,pB,x1,x2,y1,y2,dx,dy,
- opcindy,Ltype,Noflg,cent,dx,dy);
+ opcindy,Ltype,Noflg,cent,dx,dy,color);
name="fr"+nm;
tmp=Divoptions(options);
Ltype=tmp_1;
Noflg=tmp_2;
+ color=tmp_(length(tmp)-2);
opcindy=tmp_(length(tmp));
if(length(list)==2, // 15.05.12
pA=Lcrd(list_1); pB=Lcrd(list_2);
@@ -4132,7 +4186,9 @@ Framedata(nm,list,options):=(
);
if(Noflg<2,
if(isstring(Ltype),
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+color+")"));
Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+text(KCOLOR)+")"));
,
if(Noflg==1,Ltype=0);
);
@@ -4142,11 +4198,12 @@ Framedata(nm,list,options):=(
);
Framedata(nm,cent,dx,dy):=Framedata(nm,cent,dx,dy,[]);
Framedata(nm,cent,dx,dy,options):=(
- regional(name,Out,tmp,tmp1,x1,y1,x2,y2,Ltype,opcindy,Noflg);
+ regional(name,Out,tmp,tmp1,x1,y1,x2,y2,Ltype,opcindy,Noflg,color);
name="fr"+nm;
tmp=Divoptions(options);
Ltype=tmp_1;
Noflg=tmp_2;
+ color=tmp_(length(tmp)-2);
opcindy=tmp_(length(tmp));
x1=cent.x-dx; x2=cent.x+dx;
y1=cent.y-dy; y2=cent.y+dy;
@@ -4160,7 +4217,9 @@ Framedata(nm,cent,dx,dy,options):=(
);
if(Noflg<2,
if(isstring(Ltype),
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+color+")"));
Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+text(KCOLOR)+")"));
,
if(Noflg==1,Ltype=0);
);
@@ -4183,11 +4242,12 @@ Ovaldata(nm,Pdata,options):=(
//help:Ovaldata("1",[A,B]);
//help:Ovaldata(optios=[size]);
regional(name,Graph,Ctr,Dx,Dy,Rc,Out,Point,Graph,
- opstr,opcindy,tmp,tmp1,tmp2,tmp3,Ltype,Noflg);
+ opstr,opcindy,tmp,tmp1,tmp2,tmp3,Ltype,Noflg,color);
name="ov"+nm;
tmp=Divoptions(options);
Ltype=tmp_1;
Noflg=tmp_2;
+ color=tmp_(length(tmp)-2);
opcindy=tmp_(length(tmp));
opstr=tmp_(length(tmp)-1);
Rc=0.2;
@@ -4226,7 +4286,9 @@ Ovaldata(nm,Pdata,options):=(
);
if(Noflg<2,
if(isstring(Ltype),
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+color+")"));
Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+text(KCOLOR)+")"));
,
if(Noflg==1,Ltype=0);
);
@@ -4240,7 +4302,7 @@ Ovaldata(nm,Pdata,options):=(
);
Segmark(nm,ptlist):=Segmark(nm,ptlist,[]);
-Segmark(nm,ptlist,options):=Drawsegmark(nm,ptlist,options);
+Segmark(nm,ptlist,options):=Drawsegmark(nm,ptlist,options,color);
Drawsegmark(nm,ptlist):=Drawsegmark(nm,ptlist,[]);
Drawsegmark(nm,ptlist,options):=(
//help:Segmark("1",[A,B]);
@@ -4255,6 +4317,7 @@ Drawsegmark(nm,ptlist,options):=(
tp=1;
tmp1=Divoptions(options);
eqL=tmp1_5;
+ color=tmp_(length(tmp)-2);
forall(eqL,
tmp=indexof(#,"=");
tmp1=substring(#,tmp,length(#));
@@ -4516,7 +4579,7 @@ Putintersect(nm,pdata1,pdata2,ptno):=(
Arrowheaddata(point,direction):=Arrowheaddata(point,direction,[]);
Arrowheaddata(point,direction,options):=(
-//help:Arrowheaddata(A,B);
+// help:Arrowheaddata(A,B);
regional(list,Ookisa,Hiraki,Futosa,Houkou,Str,Flg,tmp,Ev,Nv,pA,pB,
pP,rF,gG,Flg,Nj,Eps,tmp1,scx,scy);
Eps=10^(-3);
@@ -4609,7 +4672,8 @@ Arrowhead(point,Houkou,options):=(
//help:Arrowhead(B,B-A,[1.5,30]);
//help:Arrowhead(A,"gr1");
// global ArrowheadNumber
- regional(name,Ltype,Noflg,reL,opstr,opcindy,ptstr,hostr,tmp,tmp1,list);
+ regional(name,Ltype,Noflg,reL,opstr,opcindy,color,
+ ptstr,hostr,tmp,tmp1,list);
name="arh"+text(ArrowheadNumber);
ArrowheadNumber=ArrowheadNumber+1;
ptstr=textformat(point,5);
@@ -4631,6 +4695,7 @@ Arrowhead(point,Houkou,options):=(
Ltype=tmp_1;
Noflg=tmp_2;
reL=tmp_6;
+ color=tmp_(length(tmp)-2);
opstr=tmp_(length(tmp)-1);
opcindy=tmp_(length(tmp));
list=Arrowheaddata(point,Houkou,options);
@@ -4643,7 +4708,9 @@ Arrowhead(point,Houkou,options):=(
);
if(Noflg<2,
if(isstring(Ltype),
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+color+")"));
Ltype=GetLinestyle(text(1)+Ltype,name);
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+text(KCOLOR)+")"));
,
// if(Noflg==1,Ltype=0);
Ltype=0;
@@ -4691,7 +4758,7 @@ Arrowdata(Arg1,Arg2,options):=(
//help:Arrowdata([A,B],[2,10]);
//help:Arrowdata("1",[p1,p2]);
regional(Retflg,nm,ptlist,name,opstr,opcindy,realL,strL,size,
- flg,Ltype,Noflg,lineflg,tmp,tmp1,tmp2,pA,pB,segpos);
+ flg,Ltype,Noflg,lineflg,tmp,tmp1,tmp2,pA,pB,segpos,color);
Retflg=0;
Noflg=0;
Ltype=0;
@@ -4711,6 +4778,7 @@ Arrowdata(Arg1,Arg2,options):=(
Noflg=tmp_2;
realL=tmp_6;
strL=tmp_7;
+ color=tmp_(length(tmp)-2);
opstr=tmp_(length(tmp)-1);
opcindy=tmp_(length(tmp));
size=1; // 15.06.11
@@ -4741,7 +4809,9 @@ Arrowdata(Arg1,Arg2,options):=(
);
if(Noflg<2,
if(isstring(Ltype),
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+color+")"));
Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+text(KCOLOR)+")"));
,
if(Noflg==1,Ltype=0);
);
@@ -4811,12 +4881,13 @@ Anglemark(Arg1,Arg2):=( // 2015.04.28 from
nm=substring(tmp,1,length(tmp)-1);
Anglemark(nm,plist,options);
);
-); // until
+); // to
Anglemark(nm,plist,options):=(
-//help:Anglemark([A,B,C],["E=\theta",2]);
+//help([A,B,C],["E=\theta",2]);
//help:Anglemark("1",[A,B,C],["E=1.2,\theta",2]);
-//help:Anglemark(options=["E/L=(sep,)letter",size]);
- regional(name,Out,pB,pA,pC,Ctr,ra,sab,sac,ratio,opstr,Bname,Bpos,
+//help:Anglemark("1",[A,B,2*pi]);
+//help:Anglemark(options=[size,"E/L=(sep,)letter"]);
+ regional(name,Out,pB,pA,pC,Ctr,ra,sab,sac,ratio,opstr,Bname,Bpos,color,
Brat,tmp,tmp1,tmp2,Num,opcindy,Ltype,eqL,realL,Rg,Th,Noflg);
name="ag"+nm;
Bpos="md"+name;
@@ -4824,16 +4895,18 @@ Anglemark(nm,plist,options):=(
tmp=Divoptions(options);
Ltype=tmp_1;
Noflg=tmp_2;
- opstr=tmp_(length(tmp)-1);
+// opstr=tmp_(length(tmp)-1);//180530
+ color=tmp_(length(tmp)-2);
opcindy=tmp_(length(tmp));
eqL=tmp_5;
realL=tmp_6;
Bname="";
- Brat=1.5;
+ Brat=1.2; //180530
Num=20;
+ opstr="";
if(length(realL)>0,
ra=realL_1*ra;
- opstr=opstr+","+text(realL_1);
+ opstr=","+text(realL_1);//180530
);
forall(eqL,
if(substring(#,0,1)=="L",Bname="Letter(");
@@ -4846,11 +4919,16 @@ Anglemark(nm,plist,options):=(
Brat=parse(substring(tmp,0,tmp1-1));
);
);
- pB=Lcrd(plist_1); pA=Lcrd(plist_2); pC=Lcrd(plist_3);
- Ctr=Lcrd(pA);
- sab=pB-pA;
- sac=pC-pA;
- Rg=[arctan2(sab)+0,arctan2(sac)+0];
+ pB=Lcrd(plist_1); pA=Lcrd(plist_2); sab=pB-pA;
+ Ctr=pA;
+ if((length(plist_3)>1)%(ispoint(plist_3)), //180506from
+ pC=Lcrd(plist_3);
+ sac=pC-pA;
+ Rg=[arctan2(sab)+0,arctan2(sac)+0];
+ ,
+ sac=pB-pA;
+ Rg=[arctan2(sab)+0,arctan2(sab)+plist_3];
+ ); //180506to
if(Rg_2<Rg_1,Rg_2=Rg_2+2*pi);
Out=[];
if(ra>min(|sab|,|sac|), // 16.12.29
@@ -4880,7 +4958,9 @@ Anglemark(nm,plist,options):=(
);
if(Noflg<2,
if(isstring(Ltype),
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+color+")"));
Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+text(KCOLOR)+")"));
,
if(Noflg==1,Ltype=0);
);
@@ -4910,11 +4990,12 @@ Paramark(nm,plist,options):=(
//help:Paramark([A,B,C],["E=\theta"]);
//help:Paramark("1",[p1,p2,p3],["E=\theta"]);
regional(name,Out,pB,pA,pC,ra,sab,sac,ratio,opstr,Bname,Bpos,
- Brat,tmp,tmp1,tmp2,Ltype,Noflg,eqL,realL,opcindy);
+ Brat,tmp,tmp1,tmp2,Ltype,Noflg,eqL,realL,opcindy,color);
name="pm"+nm;
tmp=Divoptions(options);
Ltype=tmp_1;
Noflg=tmp_2;
+ color=tmp_(length(tmp)-2);
opstr=tmp_(length(tmp)-1);
opcindy=tmp_(length(tmp));
eqL=tmp_5;
@@ -4962,7 +5043,9 @@ Paramark(nm,plist,options):=(
);
if(Noflg<2,
if(isstring(Ltype),
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+color+")"));
Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+text(KCOLOR)+")"));
,
if(Noflg==1,Ltype=0);
);
@@ -5006,11 +5089,12 @@ Bowdata(nm,plist,options):=(
//help:Bowdata([A,B],["Exprrot=t0n2r,a"]);
regional(name,Out,pB,pA,pC,ra,tmp,tmp1,tmp2,Ltype,eqL,realL,
Bname,Bpos,Th,Cut,Num,Hgt,opstr,opcindy,Ydata,pC,
- Th1,Th2,Noflg,Bops,Bmov,Tmov,Nmov,rev);
+ Th1,Th2,Noflg,Bops,Bmov,Tmov,Nmov,rev,color);
name="bw"+nm;
tmp=Divoptions(options);
Ltype=tmp_1;
Noflg=tmp_2;
+ color=tmp_(length(tmp)-2);
opstr=tmp_(length(tmp)-1);
opcindy=tmp_(length(tmp));
eqL=tmp_5;
@@ -5138,7 +5222,9 @@ Bowdata(nm,plist,options):=(
);
if(Noflg<2,
if(isstring(Ltype),
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+color+")"));
Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+text(KCOLOR)+")"));
,
if(Noflg==1,Ltype=0);
);
@@ -5242,16 +5328,17 @@ Deqplot(nm,deq,rng,Arg1,Arg2):=(
Deqplot(nm,deq,rng,initt,initf,options);
);
Deqplot(nm,deqorg,rngorg,initt,initf,options):=( //17.10.06
-//help:Deqplot("2","y`=y*(1-y)","x",0, 0.5,["Num=100"]);
-//help:Deqplot("1","y``=-y","x",0, [1,0]);
-//help:Deqplot("3","[x,y]`=[x*(1-y),0.3*y*(x-1)]","t=[0,20]",0,[1,0.5]);
+//help:Deqplot("2","y'=y*(1-y)","x",0, 0.5,["Num=100"]);
+//help:Deqplot("1","y''=-y","x",0, [1,0]);
+//help:Deqplot("3","[x,y]'=[x*(1-y),0.3*y*(x-1)]","t=[0,20]",0,[1,0.5]);
regional(deq,rng,Ltype,Noflg,eqL,opcindy,Num,name,nn,pdL,phase,
- sel,tmp,tmp1,tmp2);
+ sel,tmp,tmp1,tmp2,color);
name="de"+nm;
tmp=Divoptions(options);
Ltype=tmp_1;
Noflg=tmp_2;
eqL=tmp_5;
+ color=tmp_(length(tmp)-2);
opcindy=tmp_(length(tmp));
Num=50;
forall(eqL,
@@ -5268,6 +5355,7 @@ Deqplot(nm,deqorg,rngorg,initt,initf,options):=( //17.10.06
rng=rng+"="+textformat([XMIN,XMAX],6);
);
deq=deqorg;
+ deq=replace(deq,"'","`"); //180527
tmp=indexof(deq,"=");
tmp1=substring(deq,0,tmp-1);
if(indexof(tmp1,"[")==0,
@@ -5338,7 +5426,9 @@ Deqplot(nm,deqorg,rngorg,initt,initf,options):=( //17.10.06
);
if(Noflg<2,
if(isstring(Ltype),
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+color+")"));
Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+text(KCOLOR)+")"));
,
if(Noflg==1,Ltype=0);
);
@@ -5353,7 +5443,7 @@ Enclosing(nm,plist,options):=EnclosingS(nm,plist,options);
EnclosingS(nm,plist):=EnclosingS(nm,plist,[]);
EnclosingS(nm,plist,options):=(
//help:Enclosing("1",["sc2","crAB","sc2","Invert(sc1)"],[pt,"dr"]);
- regional(name,AnsL,Start,Eps,EEps,S,Flg,Fdata,Gdata,KL,pt,qt,
+ regional(name,AnsL,Start,Eps,EEps,S,Flg,Fdata,Gdata,KL,pt,qt,color
t1,t2,t3,ii,nn,tmp,tmp1,tmp2,Ltype,Noflg,realL,eqL,opstr,opcindy);
name="en"+nm;
tmp=Divoptions(options);
@@ -5361,6 +5451,7 @@ EnclosingS(nm,plist,options):=(
Noflg=tmp_2;
eqL=tmp_5;
realL=tmp_6;
+ color=tmp_(length(tmp)-2);
opstr=tmp_(length(tmp)-1);
opcindy=tmp_(length(tmp));
Eps=10^(-5); // 16.12.05
@@ -5488,25 +5579,12 @@ EnclosingS(nm,plist,options):=(
);
tmp=tmp+substring(tmp1,0,length(tmp1)-1)+")"+opstr+")";
GLIST=append(GLIST,tmp);//16.11.07until
- // GLIST=append(GLIST,"Tmp=[]"); // 16.11.05from
-// nn=floor(length(AnsL)/20);
-// forall(1..nn,ii,
-// tmp=AnsL_(((ii-1)*20+1)..(ii*20));
-// tmp=apply(tmp,LLcrd(#));
-// tmp="Tmp=[Tmp,"+textformat(tmp,5)+"]";
-// GLIST=append(GLIST,tmp);
-// );
-// if(length(AnsL)>nn*20,
-// tmp=AnsL_((nn*20+1)..(length(AnsL)));
-// tmp=apply(tmp,LLcrd(#));
-// tmp="Tmp=[Tmp,"+textformat(tmp,5)+"]";
-// GLIST=append(GLIST,tmp);
-// );
-// GLIST=append(GLIST,name+"=Listplot(Tmp)"); // 16.11.05until
);
if(Noflg<2,
if(isstring(Ltype),
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+color+")"));
Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+text(KCOLOR)+")"));
,
if(Noflg==1,Ltype=0);
);
@@ -5524,7 +5602,7 @@ Enclosing2(nm,plistorg,options):=(
//help:Enclosing2(options=[Eps1(0.01),Eps2(0.1)]);
regional(name,plist,AnsL,Start,Eps,Eps1,Eps2,flg,Fdata,Gdata,KL,
t1,t2,tst,ss,ii,nn,nxtno,Ltype,Noflg,realL,eqL,opstr,opcindy,
- tmp,tmp1,tmp2);
+ tmp,tmp1,tmp2,color);
name="en"+nm;
plist=plistorg;
tmp=Divoptions(options);
@@ -5532,6 +5610,7 @@ Enclosing2(nm,plistorg,options):=(
Noflg=tmp_2;
eqL=tmp_5;
realL=tmp_6;
+ color=tmp_(length(tmp)-2);
opstr=tmp_(length(tmp)-1);
opcindy=tmp_(length(tmp));
Eps=10^(-5); // 16.12.05
@@ -5654,7 +5733,9 @@ Enclosing2(nm,plistorg,options):=(
);
if(Noflg<2,
if(isstring(Ltype),
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+color+")"));
Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+text(KCOLOR)+")"));
,
if(Noflg==1,Ltype=0);
);
@@ -5746,11 +5827,12 @@ Makehatch(iolistorg,pt,vec,bdylist):=(
);
Hatchdatacindy(nm,iostr,bdylist):=Hatchdatacindy(nm,iostr,bdylist,[]);
+Hatchdata(nm,iostr,bdylist,options):=Hatchdatacindy(nm,iostr,bdylist,options);
Hatchdatacindy(nm,iostr,bdylistorg,options):=(
-//help:Hatchdatacindy("1",["ii"],[["ln1","Invert(gr1)"],["gr2","n"]]);
-//help:Hatchdatacindy(options=[angle,width]);
+//help:Hatchdata("1",["ii"],[["ln1","Invert(gr1)"],["gr2","n"]]);
+//help:Hatchdata(options=[angle,width]);
regional(name,bdylist,bdynameL,bname,Ltype,Noflg,opstr,opcindy,reL,startP,angle,
- interval,vec,nvec,flg,pt,kk,delta,sha,AnsL,tmp,tmp1,tmp2);
+ interval,vec,nvec,flg,pt,kk,delta,sha,AnsL,tmp,tmp1,tmp2,color);
name="ha"+nm;
bdylist=[];
bdynameL=[];
@@ -5797,6 +5879,7 @@ Hatchdatacindy(nm,iostr,bdylistorg,options):=(
tmp=Divoptions(options);
Ltype=tmp_1;
Noflg=tmp_2;
+ color=tmp_(length(tmp)-2);
opstr=tmp_(length(tmp)-1);
opcindy=tmp_(length(tmp));
reL=tmp_6;
@@ -5863,7 +5946,9 @@ Hatchdatacindy(nm,iostr,bdylistorg,options):=(
);
if(Noflg<2,
if(isstring(Ltype),
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+color+")"));
Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+text(KCOLOR)+")"));
,
if(Noflg==1,Ltype=0);
);
@@ -5877,34 +5962,65 @@ Hatchdatacindy(nm,iostr,bdylistorg,options):=(
tmp2;
);
-/////////// end of new Hatchdata(cindy) ///////////
-
-Shade(plist):=Shade(plist,[]);
-Shade(plist,options):=(
-//help:Shade(["gr2","sg1"],[0.5]);
-//help:Shade(["gr2","sg1"],["red" /pict2e]);
-//help:Shade(["gr2","sg1"],[[0,0,0,0.5] /pict2e]);
-//help:Shade(["gr2","sg1"],[[1,0,0] /pict2e]);
-//help:Shade([pointlist]);
- regional(tmp,tmp1,tmp2,opstr,opcindy,Str,G2,flg);
+Shade(plist):=Shade("",plist,[]); //180613from
+Shade(Arg1,Arg2):=(
+ if(isstring(Arg1),
+ Shade(Arg1,Arg2,[]);
+ ,
+ Shade("",Arg1,Arg2);
+ );
+);
+Shade(nm,plistorg,options):=( //180613to
+//help:Shade(["gr"],[0.5]);
+//help:Shade(["gr"],["Color=red"]);
+//help:Shade(["gr2","sg1"],["Color=[0,0,0,0.5]"]);
+//help:Shade(["gr2","sg1"],["Color=[1,0,0]"]);
+// help:Shade([[A,B,C,A]]);
+ regional(name,plist,jj,tmp,tmp1,tmp2,opstr,opcindy,reL,Str,G2,flg,color,ctr);
+ name="shade"+nm;
+ plist=plistorg;
if(isstring(plist_1), // 16.01.24
println("output Shade of "+plist);
,
println("output Shade of lists");
);
tmp=Divoptions(options);
+ color=tmp_(length(tmp)-2);
opstr=tmp_(length(tmp)-1);
opcindy=tmp_(length(tmp));
- flg=0;
- forall(plist,
+ reL=tmp_6; //180603from
+ if(length(reL)>0,
+ color=reL_1*color;
+ );//180603to
+ if(length(color)==4, //180602from
+ tmp=colorCmyk2rgb(color);
+ );
+ flg=0; ctr=1;
+ forall(1..(length(plist)),jj, //180613from
if(flg==0,
- if(isstring(#),tmp=parse(#),tmp=#); // from 16.01.24
- if(!islist(tmp),flg=1); until
+ tmp1=plist_jj;
+ if(isstring(tmp1),tmp=parse(tmp1),tmp=tmp1);
+ if(!islist(tmp),
+ flg=1;
+ ,
+ if(!isstring(tmp1),
+ tmp2=[];
+ forall(tmp1,if(ispoint(#),tmp=#.xy,tmp=#);
+ tmp2=append(tmp2,tmp);
+ );
+ tmp1=Dqq("-"+name+text(ctr));
+ tmp2=textformat(tmp2,6)+",["+Dqq("nodisp")+"]";
+ tmp=name+text(ctr)+"=Listplot("+tmp1+","+tmp2+")";
+ parse(tmp);
+ plist_jj=name+text(ctr);
+ ctr=ctr+1;
+ );
+ );
);
- );
+ );//180613to
if(flg==1,
-// err("some data not defined yet");
+ println(" some data not defined properly");
,
G2=Joincrvs("1",plist,["nodata"]);
G2=apply(G2,Pcrd(#));
@@ -5925,8 +6041,15 @@ Shade(plist,options):=(
); // until 16.01.24
);
Str=Str+substring(tmp1,0,length(tmp1)-1)+")"+opstr+")";
- Com2nd(Str);
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+color+")",["before"]));
+ Com2nd(Str,["before"]);
+ if(!contains([[0,0,0],[0,0,0,1]],color),Com2nd("Setcolor("+text(KCOLOR)+")",["before"]));
);
+/////////// end of new Hatchdata(cindy) ///////////
+
+
+
+
//help:end();