H=mlist(["list","Problem","People","Process","Equipment","Materials","Environment","Management"]);
H.Problem=["Which Problem?","1.)","2.)","3.)","4.)","5.)","6.)","7.)"];
H.People=["Which Peoble?","1.)","2.)","3.)","4.)","5.)","6.)","7.)"];
H.Process=["Which Process?","1.)","2.)","3.)","4.)","5.)","6.)","7.)"];
H.Equipment=["Which Equipment?","1.)","2.)","3.)","4.)","5.)","6.)","7.)"];
H.Materials=["Which Materials?","1.)","2.)","3.)","4.)","5.)","6.)","7.)"];
H.Environment=["Which Environment?","1.)","2.)","3.)","4.)","5.)","6.)","7.)"];
H.Management=["Which Management?","1.)","2.)","3.)","4.)","5.)","6.)","7.)"];

X=1000;
Y=1000;
Z=200;

X1=X-Z;
Y1=(Y-Z)/2;
X2=X/5*3;
Y2=Y-Z;
X3=X/5*1.5;
Y3=Y/2;
X4=Z/2;
X5=X2+Z/2;
Y5=Y-Z/1.55;
X6=X3+Z/2;
X7=X3+Z;
Y6=Z/1.55;
Y7=Y-Z;
Y8=Y-1.2*Z;
Y9=Y-1.4*Z;
Y10=Y-1.6*Z;
Y11=Y-1.8*Z;
Y12=Y-2.0*Z;
Y13=Y-2.2*Z;
Y14=Y3-0.4*Z
Y15=Y3-0.6*Z
Y16=Y3-0.8*Z;
Y17=Y3-1*Z;
Y18=Y3-1.2*Z;
Y19=Y3-1.4*Z;
Y20=Y3-1.6*Z;


nx=[0,X1,X5,X1,X6,X7,X4,Z,X4,Z,X5,X1,X6,X7];
ny=[Y3,Y3,Y5,Y3,Y5,Y3,Y5,Y3,Y6,Y3,Y6,Y3,Y6,Y3];

nx1=[X2,X2+Z*0.6,X1,X1-Z*0.35,X2,X2+Z*0.7,X1,X1-Z*0.25,X2,X2+Z*0.8,X1,X1-Z*0.14,X2,X2+Z*0.91]
ny1=[Y7,Y7,Y8,Y8,Y9,Y9,Y10,Y10,Y11,Y11,Y12,Y12,Y13,Y13]

nx2=[X3,X3+Z*0.6,X7,X7-Z*0.35,X3,X3+Z*0.7,X7,X7-Z*0.25,X3,X3+Z*0.8,X7,X7-Z*0.14,X3,X3+Z*0.91]
ny2=[Y7,Y7,Y8,Y8,Y9,Y9,Y10,Y10,Y11,Y11,Y12,Y12,Y13,Y13]

nx3=[0,0+Z*0.6,Z,Z-Z*0.35,0,0+Z*0.7,Z,Z-Z*0.25,0,0+Z*0.8,Z,Z-Z*0.14,0,0+Z*0.91]
ny3=[Y7,Y7,Y8,Y8,Y9,Y9,Y10,Y10,Y11,Y11,Y12,Y12,Y13,Y13]

nx4=[0,0+Z*0.88,Z,Z-Z*0.15,0,0+Z*0.78,Z,Z-Z*0.27,0,0+Z*0.67,Z,Z-Z*0.37,0,0+Z*0.57]
ny4=[Y14,Y14,Y15,Y15,Y16,Y16,Y17,Y17,Y18,Y18,Y19,Y19,Y20,Y20]

nx5=[X2,X2+Z*0.88,X1,X1-Z*0.15,X2,X2+Z*0.78,X1,X1-Z*0.27,X2,X2+Z*0.67,X1,X1-Z*0.37,X2,X2+Z*0.57]
ny5=[Y14,Y14,Y15,Y15,Y16,Y16,Y17,Y17,Y18,Y18,Y19,Y19,Y20,Y20]

nx6=[X3,X3+Z*0.88,X7,X7-Z*0.15,X3,X3+Z*0.78,X7,X7-Z*0.27,X3,X3+Z*0.67,X7,X7-Z*0.37,X3,X3+Z*0.57]
ny6=[Y14,Y14,Y15,Y15,Y16,Y16,Y17,Y17,Y18,Y18,Y19,Y19,Y20,Y20]

//Darstellung
figure("figure_name",gettext("Ishikawa-Diagram"),"Position",[50,50,500,500],"BackgroundColor",[1.0,1.0,1.0]);
title('$Ishikawa-Diagram$','color','black','fontsize',5);
plot2d([0,X],[0,Y],[-1,-1],"022");
a=gca();
a.clip_state = "clipgrf";

xstringb(X1,Y1,prettyprint(H.Problem(1)),Z,Z,"fill")
b=gce
b.box="On"
b.foreground=5

xstringb(X2,Y2,prettyprint(H.People(1)),Z,Z,"fill")
c=gce
c.box="On"
c.foreground=4
xstringb(X2,Y7,prettyprint(H.People(2)),Z/5,Z/5,"fill")
xstringb(X1,Y8,prettyprint(H.People(3)),Z/5,Z/5,"fill")
xstringb(X2,Y9,prettyprint(H.People(4)),Z/5,Z/5,"fill")
xstringb(X1,Y10,prettyprint(H.People(5)),Z/5,Z/5,"fill")
xstringb(X2,Y11,prettyprint(H.People(6)),Z/5,Z/5,"fill")
xstringb(X1,Y12,prettyprint(H.People(7)),Z/5,Z/5,"fill")
xstringb(X2,Y13,prettyprint(H.People(8)),Z/5,Z/5,"fill")

xstringb(X3,Y2,prettyprint(H.Process(1)),Z,Z,"fill")
d=gce
d.box="On"
d.foreground=3
xstringb(X3,Y7,prettyprint(H.People(2)),Z/5,Z/5,"fill")
xstringb(X7,Y8,prettyprint(H.People(3)),Z/5,Z/5,"fill")
xstringb(X3,Y9,prettyprint(H.People(4)),Z/5,Z/5,"fill")
xstringb(X7,Y10,prettyprint(H.People(5)),Z/5,Z/5,"fill")
xstringb(X3,Y11,prettyprint(H.People(6)),Z/5,Z/5,"fill")
xstringb(X7,Y12,prettyprint(H.People(7)),Z/5,Z/5,"fill")
xstringb(X3,Y13,prettyprint(H.People(8)),Z/5,Z/5,"fill")

xstringb(0,Y2,prettyprint(H.Equipment(1)),Z,Z,"fill")
e=gce
e.box="On"
e.foreground=6
xstringb(0,Y7,prettyprint(H.Equipment(2)),Z/5,Z/5,"fill")
xstringb(Z,Y8,prettyprint(H.Equipment(3)),Z/5,Z/5,"fill")
xstringb(0,Y9,prettyprint(H.Equipment(4)),Z/5,Z/5,"fill")
xstringb(Z,Y10,prettyprint(H.Equipment(5)),Z/5,Z/5,"fill")
xstringb(0,Y11,prettyprint(H.Equipment(6)),Z/5,Z/5,"fill")
xstringb(Z,Y12,prettyprint(H.Equipment(7)),Z/5,Z/5,"fill")
xstringb(0,Y13,prettyprint(H.Equipment(8)),Z/5,Z/5,"fill")

xstringb(0,0,prettyprint(H.Materials(1)),Z,Z,"fill")
f=gce
f.box="On"
f.foreground=22

xstringb(0,Y14,prettyprint(H.Materials(2)),Z/5,Z/5,"fill")
xstringb(Z,Y15,prettyprint(H.Materials(3)),Z/5,Z/5,"fill")
xstringb(0,Y16,prettyprint(H.Materials(4)),Z/5,Z/5,"fill")
xstringb(Z,Y17,prettyprint(H.Materials(5)),Z/5,Z/5,"fill")
xstringb(0,Y18,prettyprint(H.Materials(6)),Z/5,Z/5,"fill")
xstringb(Z,Y19,prettyprint(H.Materials(7)),Z/5,Z/5,"fill")
xstringb(0,Y20,prettyprint(H.Materials(8)),Z/5,Z/5,"fill")

xstringb(X2,0,prettyprint(H.Environment(1)),Z,Z,"fill")
g=gce
g.box="On"
g.foreground=11

xstringb(X3,Y14,prettyprint(H.Environment(2)),Z/5,Z/5,"fill")
xstringb(X7,Y15,prettyprint(H.Environment(3)),Z/5,Z/5,"fill")
xstringb(X3,Y16,prettyprint(H.Environment(4)),Z/5,Z/5,"fill")
xstringb(X7,Y17,prettyprint(H.Environment(5)),Z/5,Z/5,"fill")
xstringb(X3,Y18,prettyprint(H.Environment(6)),Z/5,Z/5,"fill")
xstringb(X7,Y19,prettyprint(H.Environment(7)),Z/5,Z/5,"fill")
xstringb(X3,Y20,prettyprint(H.Environment(8)),Z/5,Z/5,"fill")

xstringb(X3,0,prettyprint(H.Management(1)),Z,Z,"fill")
h=gce
h.box="On"
h.foreground=13

xstringb(X2,Y14,prettyprint(H.Management(2)),Z/5,Z/5,"fill")
xstringb(X1,Y15,prettyprint(H.Management(3)),Z/5,Z/5,"fill")
xstringb(X2,Y16,prettyprint(H.Management(4)),Z/5,Z/5,"fill")
xstringb(X1,Y17,prettyprint(H.Management(5)),Z/5,Z/5,"fill")
xstringb(X2,Y18,prettyprint(H.Management(6)),Z/5,Z/5,"fill")
xstringb(X1,Y19,prettyprint(H.Management(7)),Z/5,Z/5,"fill")
xstringb(X2,Y20,prettyprint(H.Management(8)),Z/5,Z/5,"fill")

xarrows(nx,ny,[-0.25],[5,4,3,6,22,11,13])

xarrows(nx1,ny1,[-0.5],[4])
xarrows(nx2,ny2,[-0.5],[3])
xarrows(nx3,ny3,[-0.5],[6])
xarrows(nx4,ny4,[-0.5],[22])
xarrows(nx5,ny5,[-0.5],[11])
xarrows(nx6,ny6,[-0.5],[13])


