Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion plotLaTeX/line_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def add_yvals(self, y_vals, y_name):
self.data_info()

def export(self, path="", f_name="line_results.csv"):
if self.x_vals == None:
if self.x_vals is None or len(self.x_vals) == 0:
self.data_stack["x"] = np.arange(self.n_y_vals)
self.f_name = f_name
print("**Export**\n")
Expand Down
2 changes: 1 addition & 1 deletion plotLaTeX/stem_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def LaTeXcode(self, imports=False, caption="Stem plot caption."):
print(f" ymax={np.max(self.y_vals)+1.0},")
print(f" xmin={np.min(self.x_vals)-0.5},")
print(f" xmax={np.max(self.x_vals)+0.5},")
y_ticks = np.arange(np.min(self.y_vals), np.max(self.y_vals))
y_ticks = np.arange(np.min(self.y_vals), np.max(self.y_vals) + 1)
print(r" xtick={" + ",".join(map(str, self.x_vals)) + "},")
print(r" ytick={" + ",".join(map(str, y_ticks)) + "},")

Expand Down
Loading