-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemperary-api-ref-of-geopython.html
1354 lines (1314 loc) · 58.2 KB
/
temperary-api-ref-of-geopython.html
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html class="no-js" lang="zh">
<head>
<title>GeoPyTool</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">
<link rel="stylesheet" id="responsive-style-css" href='/theme/css/style.css' type="text/css" media="all" />
<link rel="stylesheet" id="responsive-style-css" href='/theme/css/highlight.css' type="text/css" media="all" />
<link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="GeoPyTool Full Atom Feed" />
<link href="/feeds/python.atom.xml" type="application/atom+xml" rel="alternate" title="GeoPyTool Categories Atom Feed" />
</head>
<body id="index" class="blog">
<div id="container" class="hfeed">
<header id="header" >
<div id="logo">
<h1><img src="/theme/image/default-logo.png" width="300" height="100" alt="ChinaGeology" />
GeoPyTool</h1>
</div> <!-- /#logo-->
<nav id="menu" class="main-nav"><ul class="menu">
<li class="active"><a href="http://geopytool.com">Homepage</a></li>
<li class="active"><a href="http://geopytool.com/about.html">About</a></li>
<li class="active"><a href="http://geopytool.com/archives.html">Archives</a></li>
<li class="active"><a href="https://zhuanlan.zhihu.com/python-kivy">ZhiHu</a></li>
<li class="active"><a href="https://github.com/GeoPyTool/GeoPyTool">Github</a></li>
</ul></nav><!-- /#menu -->
</header>
<section id="wrapper" class="clearfix">
<section id="content" class="grid col-620" >
<section class="breadcrumb-list">
<a href="">Blog</a> ›<a href="category/python.html">Python</a> ›Temperary API Ref of GeoPython
</section>
<section id="post" class="post hentry">
<header>
<h2 class="post-title" >Temperary API Ref of GeoPython</h2>
<div class="post-meta">
<span class="meta-prep">Post in</span>
<abbr class="date" title="2017-03-18T16:20:00+08:00">
<a href="/archive/2017/ 3/index.html">六 18 三月 2017 </a>
</abbr>
<span class="meta-prep"> |Tags</span>
<!-- TOBE COMMENTS -->
</div>
</header>
<div class="post-entry">
<h1>API Ref of GeoPython</h1>
<p>created on Sat Dec 17 22:28:24 2016
@author: cycleuser
Create Date: 2015-07-13
Modify Date: 2017-04-10
a tool set for daily geology related task.</p>
<h1>prerequisite:</h1>
<p>based on Python 3.x
need math,numpy,pandas,matplotlib,xlrd,chempy</p>
<h1>Simple Sample:</h1>
<div class="highlight"><pre><span></span><span class="mi">1</span><span class="p">)</span> <span class="n">opern</span> <span class="n">a</span> <span class="n">ipython</span> <span class="n">console</span>
<span class="mi">2</span><span class="p">)</span> <span class="kn">import</span> <span class="nn">geopython</span> <span class="kn">as</span> <span class="nn">gp</span>
<span class="mi">3</span><span class="p">)</span> <span class="n">TasSample</span><span class="o">=</span> <span class="n">Tas</span><span class="p">(</span><span class="s2">"tas.xlsx"</span><span class="p">)</span>
<span class="mi">4</span><span class="p">)</span> <span class="n">TasSample</span><span class="o">.</span><span class="n">read</span><span class="p">()</span>
<span class="mi">5</span><span class="p">)</span> <span class="kn">from</span> <span class="nn">geopython</span> <span class="kn">import</span> <span class="n">gui</span>
<span class="mi">6</span><span class="p">)</span> <span class="n">gui</span><span class="o">.</span><span class="n">Show</span><span class="p">()</span>
</pre></div>
<h1>Geology related classes available:</h1>
<div class="highlight"><pre><span></span>1) Tas
2) Ree
3) Trace & Trace2 (with different sequence of trace elements)
4) Qfl & Qmflt & Qapf
5) Polar (projection of wulf net & schmidt net)
6) Harker diagram
7) CIPW Norm calculation
8) Zircon Ce4/Ce3 calculation (Ballard 2002)
</pre></div>
<h1>know issues:</h1>
<div class="highlight"><pre><span></span>1) Only work on Python 3.x
</pre></div>
<h1>Other</h1>
<p>Any issues or improvements please open an issue at <a href="https://github.com/chinageology/GeoPython/issues">here</a>
or leave a message to <a href="http://geopython.com">our website</a></p>
<h2>DualTri</h2>
<div class="highlight"><pre><span></span>a class of a double triangulars frame
</pre></div>
<p>Label: the label at the tree corners of the triangular</p>
<blockquote>
<p>type: Label: a list consist of three strings</p>
</blockquote>
<p>LabelPosition: just the Position of these Labels</p>
<blockquote>
<p>type: LabelPosition: x-y style coords , three of them</p>
</blockquote>
<p>Labels: description of the different region</p>
<blockquote>
<p>type: Labels: a list containing multiple strings</p>
</blockquote>
<p>Locations: the locations of those each one in the Labels</p>
<blockquote>
<p>type: Locations: a list of triangular coord points</p>
</blockquote>
<p>Offset: the offset value used to adjust the appearance of each one in the Labels</p>
<blockquote>
<p>type: Offset: a list of x-y coord offset values</p>
</blockquote>
<p>name: the file name used to read and use</p>
<blockquote>
<p>type: name: a string</p>
</blockquote>
<h3><strong>init</strong>(self, name=['Q', 'A', 'P', 'F'], Label=qapf.xlsx)</h3>
<div class="highlight"><pre><span></span>Initialize self. See help(type(self)) for accurate signature.
</pre></div>
<h3>show(self)</h3>
<h2>Frame</h2>
<div class="highlight"><pre><span></span>a Frame of TAS, REE, Trace Elements and other similar x-y plots
</pre></div>
<p>Width,Height: the width and height of the generated figure</p>
<blockquote>
<p>type: Width,Height: two int numbers</p>
</blockquote>
<p>Dpi: dots per inch</p>
<blockquote>
<p>type: Dpi: an int number</p>
</blockquote>
<p>Left,Right: the left and right limit of X axis</p>
<blockquote>
<p>type: Left,Right: two int numbers</p>
</blockquote>
<p>Base,Top: the left and right limit of Y axis</p>
<blockquote>
<p>type: Base,Top: two int numbers</p>
</blockquote>
<p>X0,X1,X_Gap: the left and right limit of X label, and the numbers of gap between them</p>
<blockquote>
<p>type: X0,X1,X_Gap: three int numbers</p>
</blockquote>
<p>Y0,Y1,Y_Gap: the left and right limit of Y label, and the numbers of gap between them</p>
<blockquote>
<p>type: Y0,Y1,Y_Gap: three int numbers</p>
</blockquote>
<p>FontSize: size of font of labels</p>
<blockquote>
<p>type: FontSize: an int number</p>
</blockquote>
<p>xLabel, yLabel: the labels put alongside with x and y axises</p>
<blockquote>
<p>type: xLabel, yLabel: two strings</p>
</blockquote>
<h3><strong>init</strong>(self, Width=Y Label, Height=X Label, Dpi=16, Left=7, Right=60, X_Gap=0, Base=9, Top=80, Y_Gap=0, FontSize=80, xLabel=6, yLabel=8)</h3>
<div class="highlight"><pre><span></span>Just set up all.
</pre></div>
<h3>show(self)</h3>
<p>Use the setup to set up figure feature.</p>
<h2>Line</h2>
<div class="highlight"><pre><span></span>a line class
</pre></div>
<p>Begin: the Beginning point of the line</p>
<blockquote>
<p>type: Begin: a Point Instance</p>
</blockquote>
<p>End: the End point of the line</p>
<blockquote>
<p>type: End: a Point Instance</p>
</blockquote>
<p>Points: gathering all the Point Instances</p>
<blockquote>
<p>type: Points: a list</p>
</blockquote>
<p>X,Y: the gathered x and y values of the line to use in plotting</p>
<blockquote>
<p>type: X,Y: two lists containing float numbers</p>
</blockquote>
<p>Width: the width of the line</p>
<blockquote>
<p>type: Width: an int number , mayby float is OK</p>
</blockquote>
<p>Color: the color of the Line to draw on canvas</p>
<blockquote>
<p>type: Color: a string; b: blue, g: green, r: red, c: cyan, m: magenta, y: yellow, k: black, w: white</p>
</blockquote>
<p>Style: the style used for the Line</p>
<blockquote>
<p>type: Style: a string; -, --,-., : maybe there would be some other types , from matplotlib</p>
</blockquote>
<p>Alpha: the transparency of the Point</p>
<blockquote>
<p>type: Alpha: a float number from 0 to 1, higher darker, lower more transparent</p>
</blockquote>
<p>Label: label of the Line, telling what it is and distinguish it from other lines</p>
<blockquote>
<p>type: Label: a string , if leave as "" or '' such kind of blank string, the label will not show on canvas</p>
</blockquote>
<p>Sort: the sequence used for sorting the points consisting the line</p>
<blockquote>
<p>type: Sort: a string, x means sort the points with their x values, y means use y instead of x, other means use the sequence of points as these points are put to the line</p>
</blockquote>
<h3><strong>init</strong>(self, Points=, Sort=0.3, Width=-, Color=blue, Style=1, Alpha=, Label=[(0, 0), (1, 1)])</h3>
<div class="highlight"><pre><span></span>setup the datas
</pre></div>
<h3>order(self, TMP=[])</h3>
<h3>sequence(self)</h3>
<p>sort the points in the line with given option</p>
<h3>show(self)</h3>
<p>draw the line on canvas with its setup</p>
<h2>Point</h2>
<p>a Point class</p>
<p>X,Y: the values of its x-y coord</p>
<blockquote>
<p>type: X,Y: two float numbers</p>
</blockquote>
<p>Location: gather X and Y as a tuple for further use</p>
<blockquote>
<p>type: Location: just a tuple with two numbers</p>
</blockquote>
<p>Size: the size of the Point to draw on canvas</p>
<blockquote>
<p>type: Size: a number , int or maybe float also OK , better around 1 to 20, not too large or too small</p>
</blockquote>
<p>Color: the color of the Point to draw on canvas</p>
<blockquote>
<p>type: Color: a string; b: blue, g: green, r: red, c: cyan, m: magenta, y: yellow, k: black, w: white</p>
</blockquote>
<p>Alpha: the transparency of the Point</p>
<blockquote>
<p>type: Alpha: a float number from 0 to 1, higher darker, lower more transparent</p>
</blockquote>
<p>Marker: the marker used for the Point</p>
<blockquote>
<p>type: Marker: a string; o, d, *, ^ , maybe there would be some other types , from matplotlib</p>
</blockquote>
<p>Label: label of the Point, telling what it is and distinguish it from other points</p>
<blockquote>
<p>type: Label: a string , if leave as "" or '' such kind of blank string, the label will not show on canvas</p>
</blockquote>
<h3><strong>init</strong>(self, X=, Y=o, Size=0.3, Color=red, Alpha=12, Marker=0, Label=0)</h3>
<p>just set up the values</p>
<h3>show(self)</h3>
<p>plot the Point to the canvas</p>
<h2>Points</h2>
<p>a class for multiple Points</p>
<p>X,Y: the values of its x-y coords</p>
<blockquote>
<p>type: X,Y: two lists consist of float numbers</p>
</blockquote>
<p>Size: the size of the Points to draw on canvas</p>
<blockquote>
<p>type: Size: a number , int or maybe float also OK , better around 1 to 20, not too large or too small</p>
</blockquote>
<p>Color: the color of the Points to draw on canvas</p>
<blockquote>
<p>type: Color: a string; b: blue, g: green, r: red, c: cyan, m: magenta, y: yellow, k: black, w: white</p>
</blockquote>
<p>Alpha: the transparency of the Points</p>
<blockquote>
<p>type: Alpha: a float number from 0 to 1, higher darker, lower more transparent</p>
</blockquote>
<p>Marker: the marker used for the Points</p>
<blockquote>
<p>type: Marker: a string; o, d, *, ^ , maybe there would be some other types , from matplotlib</p>
</blockquote>
<p>Label: label of the Points, telling what they are and distinguish them from other points</p>
<blockquote>
<p>type: Label: a string , if leave as "" or '' such kind of blank string, the label will not show on canvas</p>
</blockquote>
<h3><strong>init</strong>(self, points=8, Size=, Color=o, Alpha=0.3, Marker=red, Label=12, FontSize=[(0, 0), (0, 1)])</h3>
<p>just set up the values</p>
<h3>show(self)</h3>
<p>plot the Point to the canvas</p>
<h2>Polar</h2>
<p>Polar Stereographic projection for structural data</p>
<p>name: the file used to plot</p>
<blockquote>
<p>type: name: a string</p>
</blockquote>
<h3><strong>init</strong>(self, name=['N', 'S', 'W', 'E'], Label=strike.xlsx)</h3>
<p>Initialize self. See help(type(self)) for accurate signature.</p>
<h3>eqan(self, A)</h3>
<h3>eqar(self, A)</h3>
<h3>getangular(self, A, B, C)</h3>
<h3>read(self)</h3>
<h3>schmidt(self, Width=k, Color=1)</h3>
<p>read the Excel, then draw the schmidt net and Plot points, job done~</p>
<h3>wulf(self, Width=k, Color=1)</h3>
<p>read the Excel, then draw the wulf net and Plot points, job done~</p>
<h2>Qapf</h2>
<p>inherit DualTri and Tool, read xlsx or csv file and make basic Qapf diagram</p>
<p>Tags: the Tags on this diagram for description of different units</p>
<blockquote>
<p>type: Tags: a list of strings</p>
</blockquote>
<p>Labels: the labels of the different units</p>
<blockquote>
<p>type: Labels: a list of strings</p>
</blockquote>
<p>Locations: the triangular coord location of these Labels</p>
<blockquote>
<p>type: Locations: a list of tuples, these tuples contains the triangular coords</p>
</blockquote>
<p>Offset: the x-y offset of these labels on canvas</p>
<blockquote>
<p>type: Offset: a list of tuples containing x-y values</p>
</blockquote>
<h3>BinToTri(self, a, b)</h3>
<p>Turn an a-b coord to an x-y-z triangular coord .</p>
<p>if z is negative, calc with its abs then return (a, -b).</p>
<p>a,b: the numbers of the a-b coord</p>
<blockquote>
<p>type: a,b: float or double are both OK, just numbers</p>
</blockquote>
<p>return: the corresponding x-y-z triangular coord</p>
<p>teturn type : a tuple consist of x,y,z</p>
<h3>Cross(self, A=[(0, 10), (100, 0)], B=[(0, 0), (10, 10)])</h3>
<p>Return the crosspoint of two line A and B.</p>
<p>A: first line</p>
<blockquote>
<p>type: A: a list consist of two tuples, beginning and end point of the line</p>
</blockquote>
<p>B: second line</p>
<blockquote>
<p>type: B: a list consist of two tuples, beginning and end point of the line</p>
</blockquote>
<p>return: the crosspoint of A and B</p>
<p>teturn type : a list consist of two numbers, the x-y of the crosspoint</p>
<h3>Fill(self, P=0.3, Color=blue, Alpha=[(100, 0), (85, 15), (0, 3)])</h3>
<p>Fill a region in planimetric rectangular coord.</p>
<p>P: the peak points of the region in planimetric rectangular coord</p>
<blockquote>
<p>type: P: a list consist of at least three tuples, which are the points in planimetric rectangular coord</p>
</blockquote>
<p>Color: the color used to fill the region</p>
<blockquote>
<p>type: Color: a string; b: blue, g: green, r: red, c: cyan, m: magenta, y: yellow, k: black, w: white</p>
</blockquote>
<p>Alpha: the transparency used to fill the region</p>
<blockquote>
<p>type: Alpha: a float number from 0 to 1, higher darker, lower more transparent</p>
</blockquote>
<h3>TriCross(self, A=[(50, 50, 0), (0, 0, 100)], B=[(100, 0, 0), (0, 50, 60)])</h3>
<p>Return the crosspoint of two line A and B in triangular coord.</p>
<p>A: first line</p>
<blockquote>
<p>type: A: a list consist of two tuples, beginning and end point of the line</p>
</blockquote>
<p>B: second line</p>
<blockquote>
<p>type: B: a list consist of two tuples, beginning and end point of the line</p>
</blockquote>
<p>return: the crosspoint of A and B</p>
<p>teturn type : a list consist of three numbers, the x-y-z of the triangular coord</p>
<h3>TriFill(self, P=0.3, Color=blue, Alpha=[(100, 0, 0), (85, 15, 0), (0, 3, 97)])</h3>
<p>Fill a region in triangular coord.</p>
<p>P: the peak points of the region in triangular coord</p>
<blockquote>
<p>type: P: a list consist of at least three tuples, which are the points in triangular coord</p>
</blockquote>
<p>Color: the color used to fill the region</p>
<blockquote>
<p>type: Color: a string; b: blue, g: green, r: red, c: cyan, m: magenta, y: yellow, k: black, w: white</p>
</blockquote>
<p>Alpha: the transparency used to fill the region</p>
<blockquote>
<p>type: Alpha: a float number from 0 to 1, higher darker, lower more transparent</p>
</blockquote>
<h3>TriToBin(self, x, y, z)</h3>
<p>Turn an x-y-z triangular coord to an a-b coord.</p>
<p>if z is negative, calc with its abs then return (a, -b).</p>
<p>x,y,z: the three numbers of the triangular coord</p>
<blockquote>
<p>type: x,y,z: float or double are both OK, just numbers</p>
</blockquote>
<p>return: the corresponding a-b coord</p>
<p>teturn type : a tuple consist of a and b</p>
<h3><strong>init</strong>(self, name=10, Label=['Q', 'A', 'P', 'F'], FontSize=qapf.xlsx)</h3>
<p>Initialize self. See help(type(self)) for accurate signature.</p>
<h3>draw(self)</h3>
<h3>lowtri(self)</h3>
<h3>read(self)</h3>
<p>read the Excel, then use self.show() to show the frame, then Plot points, job done~</p>
<h3>show(self)</h3>
<h3>uptri(self)</h3>
<h2>QapfP</h2>
<p>inherit Qapf, read xlsx or csv file and make Qapf diagram for Plutonic Rocks</p>
<p>Tags: the Tags on this diagram for description of different units</p>
<blockquote>
<p>type: Tags: a list of strings</p>
</blockquote>
<p>Labels: the labels of the different units</p>
<blockquote>
<p>type: Labels: a list of strings</p>
</blockquote>
<p>Locations: the triangular coord location of these Labels</p>
<blockquote>
<p>type: Locations: a list of tuples, these tuples contains the triangular coords</p>
</blockquote>
<p>Offset: the x-y offset of these labels on canvas</p>
<blockquote>
<p>type: Offset: a list of tuples containing x-y values</p>
</blockquote>
<h3>BinToTri(self, a, b)</h3>
<p>Turn an a-b coord to an x-y-z triangular coord .</p>
<p>if z is negative, calc with its abs then return (a, -b).</p>
<p>a,b: the numbers of the a-b coord</p>
<blockquote>
<p>type: a,b: float or double are both OK, just numbers</p>
</blockquote>
<p>return: the corresponding x-y-z triangular coord</p>
<p>teturn type : a tuple consist of x,y,z</p>
<h3>Cross(self, A=[(0, 10), (100, 0)], B=[(0, 0), (10, 10)])</h3>
<p>Return the crosspoint of two line A and B.</p>
<p>A: first line</p>
<blockquote>
<p>type: A: a list consist of two tuples, beginning and end point of the line</p>
</blockquote>
<p>B: second line</p>
<blockquote>
<p>type: B: a list consist of two tuples, beginning and end point of the line</p>
</blockquote>
<p>return: the crosspoint of A and B</p>
<p>teturn type : a list consist of two numbers, the x-y of the crosspoint</p>
<h3>Fill(self, P=0.3, Color=blue, Alpha=[(100, 0), (85, 15), (0, 3)])</h3>
<p>Fill a region in planimetric rectangular coord.</p>
<p>P: the peak points of the region in planimetric rectangular coord</p>
<blockquote>
<p>type: P: a list consist of at least three tuples, which are the points in planimetric rectangular coord</p>
</blockquote>
<p>Color: the color used to fill the region</p>
<blockquote>
<p>type: Color: a string; b: blue, g: green, r: red, c: cyan, m: magenta, y: yellow, k: black, w: white</p>
</blockquote>
<p>Alpha: the transparency used to fill the region</p>
<blockquote>
<p>type: Alpha: a float number from 0 to 1, higher darker, lower more transparent</p>
</blockquote>
<h3>TriCross(self, A=[(50, 50, 0), (0, 0, 100)], B=[(100, 0, 0), (0, 50, 60)])</h3>
<p>Return the crosspoint of two line A and B in triangular coord.</p>
<p>A: first line</p>
<blockquote>
<p>type: A: a list consist of two tuples, beginning and end point of the line</p>
</blockquote>
<p>B: second line</p>
<blockquote>
<p>type: B: a list consist of two tuples, beginning and end point of the line</p>
</blockquote>
<p>return: the crosspoint of A and B</p>
<p>teturn type : a list consist of three numbers, the x-y-z of the triangular coord</p>
<h3>TriFill(self, P=0.3, Color=blue, Alpha=[(100, 0, 0), (85, 15, 0), (0, 3, 97)])</h3>
<p>Fill a region in triangular coord.</p>
<p>P: the peak points of the region in triangular coord</p>
<blockquote>
<p>type: P: a list consist of at least three tuples, which are the points in triangular coord</p>
</blockquote>
<p>Color: the color used to fill the region</p>
<blockquote>
<p>type: Color: a string; b: blue, g: green, r: red, c: cyan, m: magenta, y: yellow, k: black, w: white</p>
</blockquote>
<p>Alpha: the transparency used to fill the region</p>
<blockquote>
<p>type: Alpha: a float number from 0 to 1, higher darker, lower more transparent</p>
</blockquote>
<h3>TriToBin(self, x, y, z)</h3>
<p>Turn an x-y-z triangular coord to an a-b coord.</p>
<p>if z is negative, calc with its abs then return (a, -b).</p>
<p>x,y,z: the three numbers of the triangular coord</p>
<blockquote>
<p>type: x,y,z: float or double are both OK, just numbers</p>
</blockquote>
<p>return: the corresponding a-b coord</p>
<p>teturn type : a tuple consist of a and b</p>
<h3><strong>init</strong>(self, name=10, Label=['Q', 'A', 'P', 'F'], FontSize=qapf.xlsx)</h3>
<p>Initialize self. See help(type(self)) for accurate signature.</p>
<h3>draw(self)</h3>
<h3>lowtri(self)</h3>
<h3>read(self)</h3>
<p>read the Excel, then use self.show() to show the frame, then Plot points, job done~</p>
<h3>show(self)</h3>
<h3>uptri(self)</h3>
<h2>QapfV</h2>
<p>inherit Qapf, read xlsx or csv file and make Qapf diagram for Volcanic rocks</p>
<p>Tags: the Tags on this diagram for description of different units</p>
<blockquote>
<p>type: Tags: a list of strings</p>
</blockquote>
<p>Labels: the labels of the different units</p>
<blockquote>
<p>type: Labels: a list of strings</p>
</blockquote>
<p>Locations: the triangular coord location of these Labels</p>
<blockquote>
<p>type: Locations: a list of tuples, these tuples contains the triangular coords</p>
</blockquote>
<p>Offset: the x-y offset of these labels on canvas</p>
<blockquote>
<p>type: Offset: a list of tuples containing x-y values</p>
</blockquote>
<h3>BinToTri(self, a, b)</h3>
<p>Turn an a-b coord to an x-y-z triangular coord .</p>
<p>if z is negative, calc with its abs then return (a, -b).</p>
<p>a,b: the numbers of the a-b coord</p>
<blockquote>
<p>type: a,b: float or double are both OK, just numbers</p>
</blockquote>
<p>return: the corresponding x-y-z triangular coord</p>
<p>teturn type : a tuple consist of x,y,z</p>
<h3>Cross(self, A=[(0, 10), (100, 0)], B=[(0, 0), (10, 10)])</h3>
<p>Return the crosspoint of two line A and B.</p>
<p>A: first line</p>
<blockquote>
<p>type: A: a list consist of two tuples, beginning and end point of the line</p>
</blockquote>
<p>B: second line</p>
<blockquote>
<p>type: B: a list consist of two tuples, beginning and end point of the line</p>
</blockquote>
<p>return: the crosspoint of A and B</p>
<p>teturn type : a list consist of two numbers, the x-y of the crosspoint</p>
<h3>Fill(self, P=0.3, Color=blue, Alpha=[(100, 0), (85, 15), (0, 3)])</h3>
<p>Fill a region in planimetric rectangular coord.</p>
<p>P: the peak points of the region in planimetric rectangular coord</p>
<blockquote>
<p>type: P: a list consist of at least three tuples, which are the points in planimetric rectangular coord</p>
</blockquote>
<p>Color: the color used to fill the region</p>
<blockquote>
<p>type: Color: a string; b: blue, g: green, r: red, c: cyan, m: magenta, y: yellow, k: black, w: white</p>
</blockquote>
<p>Alpha: the transparency used to fill the region</p>
<blockquote>
<p>type: Alpha: a float number from 0 to 1, higher darker, lower more transparent</p>
</blockquote>
<h3>TriCross(self, A=[(50, 50, 0), (0, 0, 100)], B=[(100, 0, 0), (0, 50, 60)])</h3>
<p>Return the crosspoint of two line A and B in triangular coord.</p>
<p>A: first line</p>
<blockquote>
<p>type: A: a list consist of two tuples, beginning and end point of the line</p>
</blockquote>
<p>B: second line</p>
<blockquote>
<p>type: B: a list consist of two tuples, beginning and end point of the line</p>
</blockquote>
<p>return: the crosspoint of A and B</p>
<p>teturn type : a list consist of three numbers, the x-y-z of the triangular coord</p>
<h3>TriFill(self, P=0.3, Color=blue, Alpha=[(100, 0, 0), (85, 15, 0), (0, 3, 97)])</h3>
<p>Fill a region in triangular coord.</p>
<p>P: the peak points of the region in triangular coord</p>
<blockquote>
<p>type: P: a list consist of at least three tuples, which are the points in triangular coord</p>
</blockquote>
<p>Color: the color used to fill the region</p>
<blockquote>
<p>type: Color: a string; b: blue, g: green, r: red, c: cyan, m: magenta, y: yellow, k: black, w: white</p>
</blockquote>
<p>Alpha: the transparency used to fill the region</p>
<blockquote>
<p>type: Alpha: a float number from 0 to 1, higher darker, lower more transparent</p>
</blockquote>
<h3>TriToBin(self, x, y, z)</h3>
<p>Turn an x-y-z triangular coord to an a-b coord.</p>
<p>if z is negative, calc with its abs then return (a, -b).</p>
<p>x,y,z: the three numbers of the triangular coord</p>
<blockquote>
<p>type: x,y,z: float or double are both OK, just numbers</p>
</blockquote>
<p>return: the corresponding a-b coord</p>
<p>teturn type : a tuple consist of a and b</p>
<h3><strong>init</strong>(self, name=10, Label=['Q', 'A', 'P', 'F'], FontSize=qapf.xlsx)</h3>
<p>Initialize self. See help(type(self)) for accurate signature.</p>
<h3>draw(self)</h3>
<h3>lowtri(self)</h3>
<h3>read(self)</h3>
<p>read the Excel, then use self.show() to show the frame, then Plot points, job done~</p>
<h3>show(self)</h3>
<h3>uptri(self)</h3>
<h2>Qfl</h2>
<p>inherit Tri and Tool, read xlsx or csv file and make QFL diagram</p>
<p>Tags: the Tags on this diagram for description of different units</p>
<blockquote>
<p>type: Tags: a list of strings</p>
</blockquote>
<p>Labels: the labels of the different units</p>
<blockquote>
<p>type: Labels: a list of strings</p>
</blockquote>
<p>Locations: the triangular coord location of these Labels</p>
<blockquote>
<p>type: Locations: a list of tuples, these tuples contains the triangular coords</p>
</blockquote>
<p>Offset: the x-y offset of these labels on canvas</p>
<blockquote>
<p>type: Offset: a list of tuples containing x-y values</p>
</blockquote>
<h3>BinToTri(self, a, b)</h3>
<p>Turn an a-b coord to an x-y-z triangular coord .</p>
<p>if z is negative, calc with its abs then return (a, -b).</p>
<p>a,b: the numbers of the a-b coord</p>
<blockquote>
<p>type: a,b: float or double are both OK, just numbers</p>
</blockquote>
<p>return: the corresponding x-y-z triangular coord</p>
<p>teturn type : a tuple consist of x,y,z</p>
<h3>Cross(self, A=[(0, 10), (100, 0)], B=[(0, 0), (10, 10)])</h3>
<p>Return the crosspoint of two line A and B.</p>
<p>A: first line</p>
<blockquote>
<p>type: A: a list consist of two tuples, beginning and end point of the line</p>
</blockquote>
<p>B: second line</p>
<blockquote>
<p>type: B: a list consist of two tuples, beginning and end point of the line</p>
</blockquote>
<p>return: the crosspoint of A and B</p>
<p>teturn type : a list consist of two numbers, the x-y of the crosspoint</p>
<h3>Fill(self, P=0.3, Color=blue, Alpha=[(100, 0), (85, 15), (0, 3)])</h3>
<p>Fill a region in planimetric rectangular coord.</p>
<p>P: the peak points of the region in planimetric rectangular coord</p>
<blockquote>
<p>type: P: a list consist of at least three tuples, which are the points in planimetric rectangular coord</p>
</blockquote>
<p>Color: the color used to fill the region</p>
<blockquote>
<p>type: Color: a string; b: blue, g: green, r: red, c: cyan, m: magenta, y: yellow, k: black, w: white</p>
</blockquote>
<p>Alpha: the transparency used to fill the region</p>
<blockquote>
<p>type: Alpha: a float number from 0 to 1, higher darker, lower more transparent</p>
</blockquote>
<h3>TriCross(self, A=[(50, 50, 0), (0, 0, 100)], B=[(100, 0, 0), (0, 50, 60)])</h3>
<p>Return the crosspoint of two line A and B in triangular coord.</p>
<p>A: first line</p>
<blockquote>
<p>type: A: a list consist of two tuples, beginning and end point of the line</p>
</blockquote>
<p>B: second line</p>
<blockquote>
<p>type: B: a list consist of two tuples, beginning and end point of the line</p>
</blockquote>
<p>return: the crosspoint of A and B</p>
<p>teturn type : a list consist of three numbers, the x-y-z of the triangular coord</p>
<h3>TriFill(self, P=0.3, Color=blue, Alpha=[(100, 0, 0), (85, 15, 0), (0, 3, 97)])</h3>
<p>Fill a region in triangular coord.</p>
<p>P: the peak points of the region in triangular coord</p>
<blockquote>
<p>type: P: a list consist of at least three tuples, which are the points in triangular coord</p>
</blockquote>
<p>Color: the color used to fill the region</p>
<blockquote>
<p>type: Color: a string; b: blue, g: green, r: red, c: cyan, m: magenta, y: yellow, k: black, w: white</p>
</blockquote>
<p>Alpha: the transparency used to fill the region</p>
<blockquote>
<p>type: Alpha: a float number from 0 to 1, higher darker, lower more transparent</p>
</blockquote>
<h3>TriToBin(self, x, y, z)</h3>
<p>Turn an x-y-z triangular coord to an a-b coord.</p>
<p>if z is negative, calc with its abs then return (a, -b).</p>
<p>x,y,z: the three numbers of the triangular coord</p>
<blockquote>
<p>type: x,y,z: float or double are both OK, just numbers</p>
</blockquote>
<p>return: the corresponding a-b coord</p>
<p>teturn type : a tuple consist of a and b</p>
<h3><strong>init</strong>(self, name=['Q', 'F', 'L'], Label=qfl.xlsx)</h3>
<p>set up the values</p>
<h3>draw(self)</h3>
<p>use the values to set up the general frame and lines, fill particular zone with given colors</p>
<h3>read(self)</h3>
<p>read the Excel, then use self.show() to show the frame, then Plot points, job done~</p>
<h3>show(self)</h3>
<p>just show the triangular frame on the canvas</p>
<h2>Qmflt</h2>
<p>inherit Qfl and Tool, read xlsx or csv file and make Qmflt diagram</p>
<p>Tags: the Tags on this diagram for description of different units</p>
<blockquote>
<p>type: Tags: a list of strings</p>
</blockquote>
<p>Labels: the labels of the different units</p>
<blockquote>
<p>type: Labels: a list of strings</p>
</blockquote>
<p>Locations: the triangular coord location of these Labels</p>
<blockquote>
<p>type: Locations: a list of tuples, these tuples contains the triangular coords</p>
</blockquote>
<p>Offset: the x-y offset of these labels on canvas</p>
<blockquote>
<p>type: Offset: a list of tuples containing x-y values</p>
</blockquote>
<h3>BinToTri(self, a, b)</h3>
<p>Turn an a-b coord to an x-y-z triangular coord .</p>
<p>if z is negative, calc with its abs then return (a, -b).</p>
<p>a,b: the numbers of the a-b coord</p>
<blockquote>
<p>type: a,b: float or double are both OK, just numbers</p>
</blockquote>
<p>return: the corresponding x-y-z triangular coord</p>
<p>teturn type : a tuple consist of x,y,z</p>
<h3>Cross(self, A=[(0, 10), (100, 0)], B=[(0, 0), (10, 10)])</h3>
<p>Return the crosspoint of two line A and B.</p>
<p>A: first line</p>
<blockquote>
<p>type: A: a list consist of two tuples, beginning and end point of the line</p>
</blockquote>
<p>B: second line</p>
<blockquote>
<p>type: B: a list consist of two tuples, beginning and end point of the line</p>
</blockquote>
<p>return: the crosspoint of A and B</p>
<p>teturn type : a list consist of two numbers, the x-y of the crosspoint</p>
<h3>Fill(self, P=0.3, Color=blue, Alpha=[(100, 0), (85, 15), (0, 3)])</h3>
<p>Fill a region in planimetric rectangular coord.</p>
<p>P: the peak points of the region in planimetric rectangular coord</p>
<blockquote>
<p>type: P: a list consist of at least three tuples, which are the points in planimetric rectangular coord</p>
</blockquote>
<p>Color: the color used to fill the region</p>
<blockquote>
<p>type: Color: a string; b: blue, g: green, r: red, c: cyan, m: magenta, y: yellow, k: black, w: white</p>
</blockquote>
<p>Alpha: the transparency used to fill the region</p>
<blockquote>
<p>type: Alpha: a float number from 0 to 1, higher darker, lower more transparent</p>
</blockquote>
<h3>TriCross(self, A=[(50, 50, 0), (0, 0, 100)], B=[(100, 0, 0), (0, 50, 60)])</h3>
<p>Return the crosspoint of two line A and B in triangular coord.</p>
<p>A: first line</p>
<blockquote>
<p>type: A: a list consist of two tuples, beginning and end point of the line</p>
</blockquote>
<p>B: second line</p>
<blockquote>
<p>type: B: a list consist of two tuples, beginning and end point of the line</p>
</blockquote>
<p>return: the crosspoint of A and B</p>
<p>teturn type : a list consist of three numbers, the x-y-z of the triangular coord</p>
<h3>TriFill(self, P=0.3, Color=blue, Alpha=[(100, 0, 0), (85, 15, 0), (0, 3, 97)])</h3>
<p>Fill a region in triangular coord.</p>
<p>P: the peak points of the region in triangular coord</p>
<blockquote>
<p>type: P: a list consist of at least three tuples, which are the points in triangular coord</p>
</blockquote>
<p>Color: the color used to fill the region</p>
<blockquote>
<p>type: Color: a string; b: blue, g: green, r: red, c: cyan, m: magenta, y: yellow, k: black, w: white</p>
</blockquote>
<p>Alpha: the transparency used to fill the region</p>
<blockquote>
<p>type: Alpha: a float number from 0 to 1, higher darker, lower more transparent</p>
</blockquote>
<h3>TriToBin(self, x, y, z)</h3>
<p>Turn an x-y-z triangular coord to an a-b coord.</p>
<p>if z is negative, calc with its abs then return (a, -b).</p>
<p>x,y,z: the three numbers of the triangular coord</p>
<blockquote>
<p>type: x,y,z: float or double are both OK, just numbers</p>
</blockquote>
<p>return: the corresponding a-b coord</p>
<p>teturn type : a tuple consist of a and b</p>
<h3><strong>init</strong>(self, name=['Qm', 'F', 'Lt'], Label=qmflt.xlsx)</h3>
<p>set up the values</p>
<h3>draw(self)</h3>
<p>use the values to set up the general frame and lines, fill particular zone with given colors</p>
<h3>read(self)</h3>
<p>read the Excel, then use self.show() to show the frame, then Plot points, job done~</p>
<h3>show(self)</h3>
<p>just show the triangular frame on the canvas</p>
<h2>Ree</h2>
<p>inherit Frame, read xlsx or csv file and use the Rare Earth Elements to plot the ree diagram</p>
<p>Element: the elements used in this diagram</p>
<blockquote>
<p>type: Element: a list of strings</p>
</blockquote>
<p>Labels: a ref of Element</p>
<blockquote>
<p>type: Labels: a list of strings</p>
</blockquote>
<p>WholeData: gathering all data and find the min and max of the data file to set the limits of Y</p>
<blockquote>
<p>type: WholeData: a list of float numbers</p>
</blockquote>
<p>X0,X1: the left and right limits of X</p>
<blockquote>
<p>type: X0,X1: two int or float numbers</p>
</blockquote>
<p>X_Gap: the space between the left and right limits of X</p>
<blockquote>
<p>type: X_Gap: an int number</p>
</blockquote>
<p>name: the file name to use in this diagram</p>
<blockquote>
<p>type: name: a string</p>
</blockquote>
<h3><strong>init</strong>(self, name=, Width=$REE-Standardlized-Pattern$, Height=16, Dpi=5, Left=3, Right=-1, X0=6, X1=-1, X_Gap=15, Base=15, Top=1, Y0=16, Y1=0, Y_Gap=80, FontSize=6, xLabel=8, yLabel=ree.xlsx)</h3>
<p>Just set up all.</p>
<h3>read(self)</h3>
<p>read the Excel, then use self.show() to show the frame, then Plot points, job done~</p>
<h3>show(self)</h3>
<p>set the figure basic with the settings</p>
<h2>Tag</h2>
<p>a class for Tag put on canvas</p>
<p>Label: label of the Tag, telling what it is and distinguish them from other tags</p>
<blockquote>
<p>type: Label: a strings , if leave as "" or '' such kind of blank string, the label will not show on canvas</p>
</blockquote>
<p>Location: the location of the Tag</p>
<blockquote>
<p>type: Location: a tuple consist of x-y values of its coords</p>
</blockquote>
<p>X_offset,Y_offset: the values of its x-y offsets on coords</p>
<blockquote>
<p>type: X_offset,Y_offset: two float numbers</p>
</blockquote>
<p>FontSize: the size of font of the Tag</p>
<blockquote>
<p>type: FontSize: a number , int or maybe float also OK , better around 8 to 12, not too large or too small</p>
</blockquote>
<h3><strong>init</strong>(self, Label=12, Location=3, X_offset=-6, Y_offset=(0, 0), FontSize=Label)</h3>
<p>set up the values</p>
<h3>show(self)</h3>
<p>show the Tag on canvas with its offsets and font size, color and alpha are fixed for now</p>
<h2>Tas</h2>
<p>inherit Frame, read xlsx or csv file and use SiO2 , Na2O and K2O to plot tas diagram</p>
<p>Lines: the lines consisting the Tas frame</p>
<blockquote>
<p>type: Lines: a list of lines</p>
</blockquote>
<p>Tags: tags used for the items of Tas diagram</p>
<blockquote>
<p>type: Tagas: a list of strings</p>
</blockquote>
<p>Labels: labels on the canvas</p>
<blockquote>
<p>type: Labels: a list of strings</p>
</blockquote>
<p>Locations: the locations of these labels</p>
<blockquote>
<p>type: Locations: a list of tuple containing two numbers as x-y coords</p>
</blockquote>
<p>description: the description of the tas diagram</p>
<p>name: the file name used for tas diagram</p>
<blockquote>
<p>type: name: a string</p>
</blockquote>
<h3><strong>init</strong>(self, name=$na_2O + K_2O wt\%$, Width=$SiO_2 wt\%$, Height=12, Dpi=15, Left=15, Right=1, X0=16, X1=0, X_Gap=11, Base=77, Top=37, Y0=79, Y1=35, Y_Gap=80, FontSize=6, xLabel=8, yLabel=tas.xlsx)</h3>
<p>just set up the basic settings</p>
<h3>read(self)</h3>
<p>read the Excel, then use self.show() to show the frame, then Plot points, job done~</p>
<h3>show(self)</h3>
<p>show the tas frame and lines of tas on canvas</p>
<h2>Tool</h2>
<p>a tool set for basic tasks, crosspoint calc, coord transfer and fill region with color</p>
<h3>BinToTri(self, a, b)</h3>
<p>Turn an a-b coord to an x-y-z triangular coord .</p>
<p>if z is negative, calc with its abs then return (a, -b).</p>
<p>a,b: the numbers of the a-b coord</p>
<blockquote>
<p>type: a,b: float or double are both OK, just numbers</p>
</blockquote>
<p>return: the corresponding x-y-z triangular coord</p>
<p>teturn type : a tuple consist of x,y,z</p>
<h3>Cross(self, A=[(0, 10), (100, 0)], B=[(0, 0), (10, 10)])</h3>
<p>Return the crosspoint of two line A and B.</p>
<p>A: first line</p>
<blockquote>
<p>type: A: a list consist of two tuples, beginning and end point of the line</p>
</blockquote>
<p>B: second line</p>
<blockquote>
<p>type: B: a list consist of two tuples, beginning and end point of the line</p>
</blockquote>
<p>return: the crosspoint of A and B</p>
<p>teturn type : a list consist of two numbers, the x-y of the crosspoint</p>
<h3>Fill(self, P=0.3, Color=blue, Alpha=[(100, 0), (85, 15), (0, 3)])</h3>
<p>Fill a region in planimetric rectangular coord.</p>
<p>P: the peak points of the region in planimetric rectangular coord</p>
<blockquote>
<p>type: P: a list consist of at least three tuples, which are the points in planimetric rectangular coord</p>
</blockquote>
<p>Color: the color used to fill the region</p>
<blockquote>
<p>type: Color: a string; b: blue, g: green, r: red, c: cyan, m: magenta, y: yellow, k: black, w: white</p>
</blockquote>
<p>Alpha: the transparency used to fill the region</p>
<blockquote>
<p>type: Alpha: a float number from 0 to 1, higher darker, lower more transparent</p>
</blockquote>
<h3>TriCross(self, A=[(50, 50, 0), (0, 0, 100)], B=[(100, 0, 0), (0, 50, 60)])</h3>
<p>Return the crosspoint of two line A and B in triangular coord.</p>
<p>A: first line</p>
<blockquote>
<p>type: A: a list consist of two tuples, beginning and end point of the line</p>
</blockquote>
<p>B: second line</p>
<blockquote>
<p>type: B: a list consist of two tuples, beginning and end point of the line</p>
</blockquote>
<p>return: the crosspoint of A and B</p>
<p>teturn type : a list consist of three numbers, the x-y-z of the triangular coord</p>
<h3>TriFill(self, P=0.3, Color=blue, Alpha=[(100, 0, 0), (85, 15, 0), (0, 3, 97)])</h3>
<p>Fill a region in triangular coord.</p>
<p>P: the peak points of the region in triangular coord</p>
<blockquote>
<p>type: P: a list consist of at least three tuples, which are the points in triangular coord</p>
</blockquote>
<p>Color: the color used to fill the region</p>
<blockquote>
<p>type: Color: a string; b: blue, g: green, r: red, c: cyan, m: magenta, y: yellow, k: black, w: white</p>
</blockquote>
<p>Alpha: the transparency used to fill the region</p>
<blockquote>
<p>type: Alpha: a float number from 0 to 1, higher darker, lower more transparent</p>
</blockquote>
<h3>TriToBin(self, x, y, z)</h3>
<p>Turn an x-y-z triangular coord to an a-b coord.</p>
<p>if z is negative, calc with its abs then return (a, -b).</p>
<p>x,y,z: the three numbers of the triangular coord</p>
<blockquote>
<p>type: x,y,z: float or double are both OK, just numbers</p>
</blockquote>
<p>return: the corresponding a-b coord</p>
<p>teturn type : a tuple consist of a and b</p>
<h2>Trace</h2>
<p>inherit Frame, read xlsx or csv file and use the Trace Elements to plot the trace diagram</p>
<p>Element: the elements used in this diagram</p>
<blockquote>
<p>type: Element: a list of strings</p>
</blockquote>
<p>Labels: a ref of Element</p>
<blockquote>
<p>type: Labels: a list of strings</p>
</blockquote>
<p>name: the file name to use in this diagram</p>
<blockquote>
<p>type: name: a string</p>
</blockquote>
<h3><strong>init</strong>(self, name=, Width=$Trace-Elements-Standardlized-Pattern$, Height=16, Dpi=5, Left=3, Right=-1, X0=6, X1=-1, X_Gap=15, Base=37, Top=1, Y0=16, Y1=0, Y_Gap=80, FontSize=9, xLabel=16, yLabel=trace.xlsx)</h3>
<p>Just set up all.</p>
<h3>read(self)</h3>
<p>read the Excel, then use self.show() to show the frame, then Plot points, job done~</p>
<h3>show(self)</h3>
<p>set the figure basic with the settings</p>
<h2>Trace2</h2>
<p>inherit Frame, read xlsx or csv file and use the Trace Elements to plot the trace2 diagram</p>
<p>Element: the elements used in this diagram</p>
<blockquote>
<p>type: Element: a list of strings</p>
</blockquote>
<p>Labels: a ref of Element</p>
<blockquote>
<p>type: Labels: a list of strings</p>
</blockquote>
<p>name: the file name to use in this diagram</p>
<blockquote>
<p>type: name: a string</p>
</blockquote>
<h3><strong>init</strong>(self, name=, Width=$Trace-Elements-Standardlized-Pattern$, Height=16, Dpi=5, Left=3, Right=-1, X0=6, X1=-1, X_Gap=25, Base=26, Top=1, Y0=16, Y1=0, Y_Gap=80, FontSize=9, xLabel=16, yLabel=trace2.xlsx)</h3>
<p>Just set up all.</p>
<h3>read(self)</h3>
<p>read the Excel, then use self.show() to show the frame, then Plot points, job done~</p>
<h3>show(self)</h3>
<p>set the figure basic with the settings</p>
<h2>Tri</h2>
<p>a class of triangular frame</p>
<p>Label: the label at the tree corners of the triangular</p>
<blockquote>
<p>type: Label: a list consist of three strings</p>
</blockquote>
<p>LabelPosition: just the Position of these Labels</p>
<blockquote>
<p>type: LabelPosition: x-y style coords , three of them</p>
</blockquote>
<h3><strong>init</strong>(self, Label=['Q', 'F', 'L'])</h3>
<p>set up the values</p>
<h3>show(self)</h3>
<p>just show the triangular frame on the canvas</p>
<h2>TriLine</h2>
<p>inherit Line and Tool, line class for triangular coord</p>
<p>x,y,z: the list for gathering the x,y,z values of points consisting the line</p>
<blockquote>
<p>type: x,y,z: three lists</p>
</blockquote>
<h3>BinToTri(self, a, b)</h3>