You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
"""
|
|
Example saving a figure
|
|
"""
|
|
import matplotlib.pyplot as plt
|
|
import pathlib
|
|
|
|
HERE = pathlib.Path(__file__).parent
|
|
|
|
|
|
def create_graph():
|
|
x = [1, 2, 3]
|
|
y = [2, 4, 6]
|
|
plt.plot(x, y)
|
|
plt.savefig(HERE.joinpath("mygraph.png"))
|
|
|
|
|
|
if __name__ == "__main__":
|
|
print(HERE)
|
|
create_graph() |