Skip to content

Commit 3473c1e

Browse files
added TODO notes and definition for missing functions
1 parent ac9bdc7 commit 3473c1e

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

tikzplotlib/cleanfigure.py

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
from matplotlib import pyplot as plt
44

55

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+
612
def cleanfigure(fighandle=None, axhandle=None, target_resolution=600, scalePrecision=1.0):
713
"""cleans figure as a preparation for tikz export.
814
This will minimize the number of points required for the tikz figure.
@@ -523,6 +529,7 @@ def moveToBox(x, xRef, xLim, yLim):
523529

524530
# #% Create the new point
525531
# xNew = x + bsxfun(@times ,minAlpha, (xRef-x));
532+
raise NotImplementedError
526533
return xNew
527534

528535

@@ -661,6 +668,9 @@ def simplifyLine(fighandle, axhandle, linehandle, target_resolution):
661668
linehandle.set_ydata(data[:, 1])
662669

663670

671+
def simplifyStairs(fighandle, axhandle, linehandle):
672+
# TODO: implement this
673+
raise NotImplementedError
664674

665675

666676
def pixelate(x, y, xToPix, yToPix):
@@ -823,6 +833,35 @@ def opheimSimplify(x, y, tol):
823833
return mask
824834

825835

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
826865

827866

828867
def limitPrecision(fighandle, axhandle, linehandle, alpha):
@@ -882,6 +921,9 @@ def limitPrecision(fighandle, axhandle, linehandle, alpha):
882921
linehandle.set_ydata(data[:, 1])
883922

884923

924+
def pruneOutsideText(fighandle, axhandle, linehandle):
925+
# TODO implement this
926+
raise NotImplementedError
885927

886928

887929
def segmentVisible(data, dataIsInBox, xLim, yLim):
@@ -963,6 +1005,33 @@ def corners2D(xLim, yLim):
9631005
return bottomLeft, topLeft, bottomRight, topRight
9641006

9651007

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
9661035

9671036

9681037
def segmentsIntersect(X1, X2, X3, X4):

0 commit comments

Comments
 (0)