Adds pdf export.

This commit is contained in:
Lukas Prause
2022-12-09 16:36:17 +01:00
parent eb7c832b98
commit 6e4b0a3466

View File

@@ -54,6 +54,7 @@ if __name__ == "__main__":
parser.add_argument("-a", "--column", required=True, help="Column to plot") parser.add_argument("-a", "--column", required=True, help="Column to plot")
parser.add_argument("-l", "--label", help="Label above the plot.") parser.add_argument("-l", "--label", help="Label above the plot.")
parser.add_argument("--no_legend", action="store_false", default=True, help="Do not show legend.") parser.add_argument("--no_legend", action="store_false", default=True, help="Do not show legend.")
parser.add_argument("--save", default=None, help="Location to save pdf file.")
parser.add_argument( parser.add_argument(
"--show_providerinfo", "--show_providerinfo",
@@ -205,4 +206,8 @@ if __name__ == "__main__":
##################################### #####################################
# df.plot(x="longitude", y="latitude", kind="scatter", colormap="YlOrRd") # df.plot(x="longitude", y="latitude", kind="scatter", colormap="YlOrRd")
plt.show()
if args.save:
plt.savefig("{}gps_plot.pdf".format(args.save))
else:
plt.show()