Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#2 Updated the file DF2Tex.py #538

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions PAMI/extras/graph/DF2Tex.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#
# obj.generateLatexCode(result, "minSup", "runtime", "algorithmColumn")
#
# obj.print()
# obj.printLatex()
#
# obj.save("outputFile.tex")
#
Expand Down Expand Up @@ -60,7 +60,7 @@ class DF2Tex:

obj.generateLatexCode(result, "minSup", "runtime", "algorithmColumn")

obj.print()
obj.printLatex()

obj.save("outputFile.tex")
"""
Expand Down Expand Up @@ -106,7 +106,7 @@ def generateLatexCode(self, result: pd.DataFrame, xColumn, yColumn, algorithmCol
latexCode += "\\end{axis}"
self.latexCode = latexCode

def print_latex(self):
def printLatex(self):
"""
Print the generated LaTeX code.
"""
Expand All @@ -127,12 +127,12 @@ def save(self, outputFileName):
print(f"LaTeX file saved as {outputFileName}")

# Example usage
result = pd.DataFrame()
obj = DF2Tex()
# result = pd.DataFrame()
# obj = DF2Tex()
# generateLatexCode function as four parameters dataFrame, xColumn-name, yColumn-name,
# algorithmColumn-name is optional
obj.generateLatexCode(result, "minSup", "runtime", "algorithmColumn")
# obj.generateLatexCode(result, "minSup", "runtime", "algorithmColumn")
# printLatexCode function prints the output of latex file
obj.print()
# obj.printLatex()
# save function gives the outputFile
obj.save("outputFile.tex")
# obj.save("outputFile.tex")