|
3 | 3 | from matplotlib import pyplot as plt
|
4 | 4 |
|
5 | 5 |
|
| 6 | +# TODO: implement 3D functionality |
| 7 | +# TODO: implement remaining functions |
| 8 | +# TODO: find suitable test cases for remaining functions. |
| 9 | +# TODO: subplot support |
| 10 | + |
| 11 | + |
6 | 12 | def cleanfigure(fighandle=None, axhandle=None, target_resolution=600, scalePrecision=1.0):
|
7 | 13 | """cleans figure as a preparation for tikz export.
|
8 | 14 | This will minimize the number of points required for the tikz figure.
|
@@ -523,6 +529,7 @@ def moveToBox(x, xRef, xLim, yLim):
|
523 | 529 |
|
524 | 530 | # #% Create the new point
|
525 | 531 | # xNew = x + bsxfun(@times ,minAlpha, (xRef-x));
|
| 532 | + raise NotImplementedError |
526 | 533 | return xNew
|
527 | 534 |
|
528 | 535 |
|
@@ -661,6 +668,9 @@ def simplifyLine(fighandle, axhandle, linehandle, target_resolution):
|
661 | 668 | linehandle.set_ydata(data[:, 1])
|
662 | 669 |
|
663 | 670 |
|
| 671 | +def simplifyStairs(fighandle, axhandle, linehandle): |
| 672 | + # TODO: implement this |
| 673 | + raise NotImplementedError |
664 | 674 |
|
665 | 675 |
|
666 | 676 | def pixelate(x, y, xToPix, yToPix):
|
@@ -823,6 +833,35 @@ def opheimSimplify(x, y, tol):
|
823 | 833 | return mask
|
824 | 834 |
|
825 | 835 |
|
| 836 | +def updateAlpha(X1, X2, X3, X4, minAlpha): |
| 837 | + """Checks whether the segments X1--X2 and X3--X4 intersect. |
| 838 | + |
| 839 | + Parameters |
| 840 | + ---------- |
| 841 | + X1 : [type] |
| 842 | + [description] |
| 843 | + X2 : [type] |
| 844 | + [description] |
| 845 | + X3 : [type] |
| 846 | + [description] |
| 847 | + X4 : [type] |
| 848 | + [description] |
| 849 | + minAlpha : [type] |
| 850 | + [description] |
| 851 | + |
| 852 | + Returns |
| 853 | + ------- |
| 854 | + [type] |
| 855 | + [description] |
| 856 | + |
| 857 | + Raises |
| 858 | + ------ |
| 859 | + NotImplementedError |
| 860 | + [description] |
| 861 | + """ |
| 862 | + # TODO implement this |
| 863 | + raise NotImplementedError |
| 864 | + return minAlpha |
826 | 865 |
|
827 | 866 |
|
828 | 867 | def limitPrecision(fighandle, axhandle, linehandle, alpha):
|
@@ -882,6 +921,9 @@ def limitPrecision(fighandle, axhandle, linehandle, alpha):
|
882 | 921 | linehandle.set_ydata(data[:, 1])
|
883 | 922 |
|
884 | 923 |
|
| 924 | +def pruneOutsideText(fighandle, axhandle, linehandle): |
| 925 | + # TODO implement this |
| 926 | + raise NotImplementedError |
885 | 927 |
|
886 | 928 |
|
887 | 929 | def segmentVisible(data, dataIsInBox, xLim, yLim):
|
@@ -963,6 +1005,33 @@ def corners2D(xLim, yLim):
|
963 | 1005 | return bottomLeft, topLeft, bottomRight, topRight
|
964 | 1006 |
|
965 | 1007 |
|
| 1008 | +def corners3D(xLim, yLim, zLim): |
| 1009 | + # TODO: implement this |
| 1010 | + raise NotImplementedError |
| 1011 | + return corners |
| 1012 | + |
| 1013 | + |
| 1014 | +def getProjectionMatrix(fighandle, axhandle, linehandle): |
| 1015 | + # TODO: implement this |
| 1016 | + raise NotImplementedError |
| 1017 | + |
| 1018 | + |
| 1019 | +def isValidTargetResolution(val): |
| 1020 | + # TODO: implement this |
| 1021 | + raise NotImplementedError |
| 1022 | + return isValid |
| 1023 | + |
| 1024 | + |
| 1025 | +def isValidAxis(val): |
| 1026 | + # TODO: implement this |
| 1027 | + raise NotImplementedError |
| 1028 | + return isValid |
| 1029 | + |
| 1030 | + |
| 1031 | +def normalizeAxis(fighandle, axhandle): |
| 1032 | + # TODO: implement this |
| 1033 | + raise NotImplementedError |
| 1034 | + return isValid |
966 | 1035 |
|
967 | 1036 |
|
968 | 1037 | def segmentsIntersect(X1, X2, X3, X4):
|
|
0 commit comments